Guys, yesterday i just make a script with email as a result and put them into crontab, it will execute on 23.33.
Today, i recieved email from system twice as result the script. the first email send at 23.02 and the second send at 23.33
how is the script execute two times ? the first job run before the schedule ? please help me!
Post the crontab entry for the script and post your script. Posting relevant data will help people respond to posts better
the crontab entry is
33 23 * * * /usr/local/bin/myscript.sh.
It should run only on 23:33, is it right ?
cron entry looks correct.
I would look into cron log. Can you grep myscript.sh from your cron log and post the lines here?
[quote=dude2cool;302581669]
cron entry looks correct.
dude2cool,
here is cunk of cron log
root : CMD ( /usr/sbin/dumpctrl -k >/dev/null 2>/dev/null ) : PID ( 19005596 ) : Tue Dec 13 23:00:00 2011
Cron Job with pid: 19005596 Successful
root : CMD ( /usr/sbin/dumpctrl -k >/dev/null 2>/dev/null ) : PID ( 15335536 ) : Tue Dec 13 23:05:00 2011
Cron Job with pid: 15335536 Successful
root : CMD ( /usr/sbin/dumpctrl -k >/dev/null 2>/dev/null ) : PID ( 15663336 ) : Tue Dec 13 23:10:00 2011
Cron Job with pid: 15663336 Successful
root : CMD ( /usr/sbin/dumpctrl -k >/dev/null 2>/dev/null ) : PID ( 19398834 ) : Tue Dec 13 23:15:00 2011
Cron Job with pid: 19398834 Successful
root : CMD ( /usr/sbin/dumpctrl -k >/dev/null 2>/dev/null ) : PID ( 20709424 ) : Tue Dec 13 23:20:00 2011
Cron Job with pid: 20709424 Successful
root : CMD ( /usr/sbin/dumpctrl -k >/dev/null 2>/dev/null ) : PID ( 12648500 ) : Tue Dec 13 23:25:00 2011
Cron Job with pid: 12648500 Successful
root : CMD ( /usr/sbin/dumpctrl -k >/dev/null 2>/dev/null ) : PID ( 13303868 ) : Tue Dec 13 23:30:00 2011
Cron Job with pid: 13303868 Successful
root : CMD ( /usr/local/bin/myscript.sh ) : PID ( 15663136 ) : Tue Dec 13 23:33:00 2011
Cron Job with pid: 15663136 Successful
there are not myscript.sh running at 23:02...
Looking at the logs, so cron definitely did not run it. See what happens tonight.
1 Like
Btw, thanks a lot for your help