crontab not working
I am a new bie to linux. I had never used cron. I had written simple cron entry
$ crontab -e 1,2,3,4,5,6 * * * * echo "hello ..." >> /home/dp/dp 2>&1 I expect to write this "hello...." message to a file /home/dp/dp 6times every hour, But it does not happen. Pls help me Durga. |
Try
1,2,3,4,5,6 * * * * echo "hello ..." 2>&1 >> /home/dp/dp If still nothing happens check crons logfiles. Cheers, Tink |
Well it works on my machine... checked if your cron daemon's running?
Cause when I was new to Linux I didn't even know there was a cron daemon and thus had some problems getting cronjobs to run, too. ^^ |
Can you give me the details of cron's log files. If
I had executed a job with CRON, Will it log some some info, that it had executed a job at so and so time. like.... |
cron logs are located at
/var/log/cron |
Before starting my exercise with cron i cleared the contents of /var/log/cron. So that when my job runs it will update the log file, i can easily monitor the log. Now my cron jobs are working, but the /var/log/cron is not being updated. I had restarted the crond daemon. But it still does not update the /var/log/cron.
Pls advise. |
The alternate way is to have results emailed by
cron ... as root (or the owner of the cronjob) do a on the command-line. Cheers, Tink |
All times are GMT -5. The time now is 02:49 AM. |