problems using cron
i have some unresolved network problems:
http://www.linuxquestions.org/questi...hreadid=145436 where my network stalls out and the only way to fix it is to restart my nic. so i created a script in my /root directory called netrestart which contains: Code:
ifconfig eth0 down Code:
0 0,6,12,18 * * * /bin/bash /root/netrestart 1> /dev/null |
"0 0,6,12,18 * * * /bin/bash /root/netrestart 1> /dev/null"
I think that you have specified to run your command on every December 6 when December 6 happens to be the eighteenth day of the week. The fields are: minute hour day month dayofweek command Here is a crontab man page: http://campuscgi.princeton.edu/man?crontab ___________________________________ Be prepared. Create a LifeBoat CD. http://users.rcn.com/srstites/LifeBo...home.page.html Steve Stites |
Quote:
|
" should this not run at 12am, 6am, 12pm, and 6pm? and then it should run every day, every month, every day of the week."
Yes. You are correct. I gave you an incorrect answer off the top of my head where I assumed that the commas would be treated as white spaces. Sorry. Now I have checked your cron entry against a reference book, "Running Linux". Everything checks out OK. In my crontab (set up by Fedora) there is a SHELL=/bin/bash variable set at the beginning and my crontab entries do not have a shell specified. So maybe you are specifying /bin/bash twice. You could try: 0 0,6,12,18 * * * /root/netrestart 1> /dev/null It is also possible that Mandrake is using a variation of the cron system called the Vixie cron system. Fedora and Red Hat use the Vixie variation of cron and Mandrake patterns itself after Red Hat. You can tell that you are using Vixie if you have a script installed called /usr/bin/run-parts. If so, then your crontab entry should be: 0 0,6,12,18 * * * root run-parts /root/netrestart 1> /dev/null ___________________________________ Be prepared. Create a LifeBoat CD. http://users.rcn.com/srstites/LifeBo...home.page.html Steve Stites |
All times are GMT -5. The time now is 06:20 AM. |