bash - Crontab won't run automatically -
i have setup cron job shown below won't run. when run script manually, don't see errors.
#_____wpr jobs 00 9 * * * mon-sat /var/spool/ftpexts/bin/exe_get_x_wpr.sh >> /var/spool/ftpexts/outboundlogs/exe_get_x_wpr.log 00 9 * * * mon-sat /var/spool/ftpexts/bin/exe_get_y_wpr.sh >> /var/spool/ftpexts/outboundlogs/exe_get_y_wpr.log 00 9 * * * mon-sat /var/spool/ftpexts/bin/exe_get_z_wpr.sh >> /var/spool/ftpexts/outboundlogs/exe_get_z_wpr.log when execute script manually shown below, runs smoothly log records too.
/var/spool/ftpexts/bin/exe_get_x_wpr.sh >> /var/spool/ftpexts/outboundlogs/exe_get_x_wpr.log
crontab trying execute mon-sat command.
the day of week specified 5th field of crontab entry. have *, means runs on day of week. delete 5th field, making mon-sat 5th field. (interesting, didn't know until crontab recognize names.)
update: crontab(5) man page (type man 5 crontab read on system) says:
names can used "month" , "day of week" fields. use first 3 letters of particular day or month (case doesn't matter). ranges or lists of names not allowed.
you mon-sat worked you. quick experiment indicates ranges of names work, since documentation says they're not allowed, suggest not depending on that. write 1-6 rather mon-sat if want job run monday through saturday.
Comments
Post a Comment