This weird behaviour from cronjob
- by The DOCTOR from TARDIS
I have set the crontab like this:
*/5 0 * * * /www/permitChat.sh
and the /www/permitChat.sh is this:
# We are setting the name of file
# in the variable along with complete path.
sFilePath=`date +\/www\/ChatLogs\/%Y\/%m/%d_%m_%Y.txt`
# First we set its permissions to
# readable by all users, and then
# modify them to be writable by only root.
chmod a=r $sFilePath
chmod u+w $sFilePath
ls -lh $sFilePath
The trouble I am facing is, the cron gets executed after 12:00 PM everyday, instead of executing at 12:00 AM to 01:00 AM, every 5 minutes.
What could be wrong? All my system variables appear to be synced.