Skip to main content

Timeline for Crontab suddenly doesn't start jobs

Current License: CC BY-SA 4.0

6 events
when toggle format what by license comment
Feb 24, 2019 at 6:36 comment added Seamus @goldilocks: Good point
Feb 23, 2019 at 21:19 comment added goldilocks "Fortunately, Linux allows us to 'redirect' the stderr stream" -> Would be more accurate to say "the shell", or more specifically bash or sh. Different shells in fact use different syntax for this (and e.g. bash includes sugar that sh doesn't, such as &>). What you've used is standard POSIX shell, which is good because it is the normal case on the Pi.
Feb 23, 2019 at 1:09 comment added Seamus @Myronaz: Also remember that the "cron user" does not have the same environment vars as you do working from the command line. Therefore, it's a good habit to use full paths for all commands and file locations in cron jobs.
Feb 23, 2019 at 1:05 comment added Seamus @Myronaz OK... but your script contains a shebang for sh, so why are you calling bash ? And I just noticed that the first line of your script is cd /... why do you do that? As far as the redirect, maybe try adding this after your shebang line: >&2 echo "test stderr redirect"
Feb 22, 2019 at 21:04 comment added Myronaz Alright. I see. Well I have to use bash because sh complains about paths, unfortunately adding the sleep part does not solve the problem, i've already got stderr redirected but nothing appears on my files, which tells me that the python modules do not run at all. As for the reboot line you were right, i forgot to put sudo in which explains why it wasn't restarting
Feb 22, 2019 at 20:17 history answered Seamus CC BY-SA 4.0