0

I think one of my cronjobs failed when it ran at 00:00:00 2018-01-01. How can I debug that? Changing the system clock is clearly the wrong way to go, since it would disrupt the whole system and also depend on timing in order to reproduce the error...

1
  • It would help showing the offending cronjob line and/or script. Jan 1, 2018 at 12:55

1 Answer 1

0

Start by,

  1. Log entry and exit from shell script, so that you can ascertain that the script was started. (You might establish that it was started late in the minute 00:00:59 and effectively ran twice for 00:01:00 ?)

  2. If your script gets the time to influence flow, then instead of getting the actual time, re-write it so that it takes the time (or date) as a parameter. This way you can test your script at various simulated times by passing them as a parameter.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .