Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Not able to run jobs from cron using root account.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 442
Location: India

PostPosted: Mon Dec 29, 2014 1:03 pm    Post subject: [SOLVED] Not able to run jobs from cron using root account. Reply with quote

Hi Experts, I have cron setup on my server. I am not sure as to why the jobs are not able to run. Below are the jobs, status for the crond and the /var/log/cron messages.

Quote:
crontab -l
01 * * * * /bin/echo "Hello"


Quote:
/etc/init.d/crond status
crond (pid 4903) is running...


Quote:
vim /var/log/cron-20141229
Dec 29 07:23:05 localhost crond[2448]: (CRON) STARTUP (1.4.4)
Dec 29 07:23:06 localhost crond[2448]: (CRON) INFO (running with inotify support)
Dec 29 07:30:01 localhost CROND[2732]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Dec 29 07:40:01 localhost CROND[2751]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Dec 29 07:50:01 localhost CROND[2770]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Dec 29 08:00:01 localhost CROND[2789]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Dec 29 08:01:01 localhost CROND[2793]: (root) CMD (run-parts /etc/cron.hourly)
Dec 29 08:01:01 localhost run-parts(/etc/cron.hourly)[2793]: starting 0anacron
Dec 29 08:01:02 localhost anacron[2804]: Anacron started on 2014-12-29
Dec 29 08:01:02 localhost run-parts(/etc/cron.hourly)[2806]: finished 0anacron
Dec 29 08:01:02 localhost anacron[2804]: Will run job `cron.daily' in 24 min.
Dec 29 08:01:02 localhost anacron[2804]: Jobs will be executed sequentially
Dec 29 08:01:02 localhost run-parts(/etc/cron.hourly)[2793]: starting mcelog.cron
Dec 29 08:01:02 localhost run-parts(/etc/cron.hourly)[2814]: finished mcelog.cron
Dec 29 08:10:01 localhost CROND[2832]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Dec 29 08:20:01 localhost CROND[2852]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Dec 29 08:25:02 localhost anacron[2804]: Job `cron.daily' started
Dec 29 08:25:02 localhost run-parts(/etc/cron.daily)[2861]: starting 00webalizer
Dec 29 08:25:02 localhost run-parts(/etc/cron.daily)[2868]: finished 00webalizer
Dec 29 08:25:02 localhost run-parts(/etc/cron.daily)[2861]: starting certwatch
Dec 29 08:25:02 localhost run-parts(/etc/cron.daily)[2861]: starting 00webalizer
Dec 29 08:25:02 localhost run-parts(/etc/cron.daily)[2868]: finished 00webalizer
Dec 29 08:25:02 localhost run-parts(/etc/cron.daily)[2861]: starting certwatch
Dec 29 08:25:02 localhost run-parts(/etc/cron.daily)[2879]: finished certwatch
Dec 29 08:25:02 localhost run-parts(/etc/cron.daily)[2861]: starting cups
Dec 29 08:25:02 localhost run-parts(/etc/cron.daily)[2886]: finished cups
Dec 29 08:25:02 localhost run-parts(/etc/cron.daily)[2861]: starting logrotate


Last edited by manu_leo on Wed Dec 31, 2014 7:40 am; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7048
Location: almost Mile High in the USA

PostPosted: Tue Dec 30, 2014 9:28 pm    Post subject: Reply with quote

What are you expecting your test to do?

Write the word "Hello" a minute after the hour every hour to stdout which will go to the bitbucket or dead letter if you don't have sendmail running?

You can also add files in /etc/cron.(*) directory to run the script $1 (hourly, daily, weekly, monthly).
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 442
Location: India

PostPosted: Wed Dec 31, 2014 7:01 am    Post subject: Reply with quote

Hi , thanks for looking into this.

Actually I was trying to test the cron as someone reported that it is not working. I corrected the syntax and re-directed the 0/p to a file. It was actually working.

Appreciate all your help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum