I have issue with my crontab - cron is not launching one of my scripts
this is top part of my crontab (root)
SHELL=/bin/bash
#---------------------------------------
# Items availability
#---------------------------------------
# Daily offer import + daily sync everything
30 7 * * * /var/www/import/download_offers.sh > /var/logs/download_offers_cron.log
# Updates availability
# 7:45 mass update happens
*/5 0-6 * * * /var/www/import/check_availability.sh
0,5,10,15,20,25 7 * * * /var/www/import/check_availability.sh
*/5 8-23 * * * /var/www/import/check_availability.sh
#---------------------------------------
# Sales import + sync
#---------------------------------------
# Import EBAY + WWW sales. Run sales cleaner
*/15 * * * * /var/www/import/import_all.sh
*/5 * * * * /var/www/import/import_www.sh
55 13 * * * /var/www/import/import_all.sh
58 13 * * * /var/www/import/import_www.sh
... more stuff 7KB total ...
it used to work perfect for long time but after last week reboot this line
30 7 * * * /var/www/import/download_offers.sh > /var/log/download_offers_cron.log
stopped working. contents of download_offers.sh:
#!/bin/sh
echo "Working..."
echo "Download offers started" > /var/log/import/OFFER_START.log
... some private stuff ; just bunch of wget's and echo's ...
file /var/log/import/OFFER_START.log
is not created
what I have tried so far
- I changed time to 7:30, 8:00 (it used to be 7:45 originaly)
- I added
> /var/logs/download_offers_cron.log
but file hasn't been created - I browsed root emails, all scripts are launched except that one
- file is +x executable
is there some known bug? is there any other option to debug crontab except mails? why script doesn't launch at all? it used to work fine after last week reboot....
Please help I am losing my mind
Edit:
I am using CentOS release 6.6 (Final)
this is /var/log/cron
Mar 10 07:30:01 serverpro1 CROND[11291]: (root) CMD (/var/www/import/download_offers.sh > /var/logs/download_offers_cron.log)
looks like cron entry is fine but there is no /var/log/download_offers_cron.log file anyway?
SHELL=/bin/bash
, then in your script you use#!/bin/sh
. Your cron is really running as root so it can write to the directories where your logs go? Can you add a( date ; set ) >>/tmp/cron.log
as 2nd line to your script?