crontab not working
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom mon dow user command */5 * * * * root echo "****************"|mail -s "eeeee" [emailabc@gmail.com[/email] 55 * * * * root cd / && run-parts --report /etc/cron.hourly what could be the possible reasons of /etc/crontab(systemwide cron) not working Please help |
What doesn't work?
Any pointers in the logfiles, mail from cron to root? Cron uses a limited path, so try to give the whole path to the commands and files. Kind regards |
what is this / for in:
*/5 and why do you mention "root" in those lines? Have a look in http://adminschoice.com/crontab-quick-reference for syntax and examples Also, how did you get crontab list? did you launch: crontab -l |
Quote:
I would strongly suggest that you hide your e-mailaddress |
Quote:
Code:
*/5 * * * * Kind regards |
I did not know the */5 syntax, but tried it, and it works.
There is still the issue with "root" mentioned on every line, and I'm sure this won't work. Also, why do you mention the SHELL and PATH variables??? Please remove this from the crontab entries Here is what I suggest you put in your cron (using crontab -e) <quote> 5 * * * * echo "****************"|mail -s "eeeee" abc@gmail.com 55 * * * * cd / && run-parts --report /etc/cron.hourly */1 * * * * echo cron-works>/tmp/cron-works.txt </quote> you should see a file created in /tmp every minute (check with ls -l) |
using crontab -e, enter this AND ONLY THIS in your crontab:
Code:
*/5 * * * * echo "****************"|mail -s "eeeee" abc@gmail.com And maybe your other cron lines now work because I removed "root" from them And also, I removed the variables definition you had put at the beginning (I don't think this is crontab syntax. Anyway, start with exactly this, and if my */1 line works, then you have a model |
Quote:
Gives an error message, but the cron is executed. Kind regards |
All times are GMT -5. The time now is 06:06 AM. |