Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Crontab Doesn't Work


  • Please log in to reply
No replies to this topic

#1 forrestmage

forrestmage

  • Members
  • 31 posts
  • OFFLINE
  •  
  • Local time:04:30 PM

Posted 05 May 2008 - 05:22 PM

So I put my script file (sqlbu.sh) into cron-daily and it didn't work. So I edited /etc/crontab to look like this. I have my script sitting in cron-daily as well as in /etc and I set the times for a few minutes ahead of where I was at the time- I even restarted cron. Neither my script or the testfile creation worked.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
10 40 * * * root /etc/sqlbu.sh
15 11 * * * root /etc/cron.daily/sqlbu.sh
47 12 * * * root /usr/bin/touch /tmp/testfile.txt

ps aux | grep cron
give me this
root 7312 0.0 0.0 22120 1072 ? Ss 12:41 0:00 /usr/sbin/cron
root 7403 0.0 0.0 5120 820 pts/1 R+ 16:18 0:00 grep cron

so it appears to be running. What am I missing? The script runs fine manually, btw. This is Ubuntu Gutsy Gibbon fyi
and there is not a cron.log in /var/log or anywhere else for that matter. Nothing in /var/log/messages regarding cron.... I just don't know...

Edited by forrestmage, 05 May 2008 - 05:23 PM.


BC AdBot (Login to Remove)

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users