Hot answers tagged

1 vote

How to make timeout(1) behave in cron like it behaves in interactive shell

Due to the double quotes, $? is being expanded before the bash command is invoked. It is being replaced by the exit status of the previous command (which was the first exit $?) A quick demo bash -c '...
1 vote

How to make timeout(1) behave in cron like it behaves in interactive shell

You can try to run the command like this: bash -c "timeout 1 sleep 2"; echo $?
  • 3,420
1 vote
Accepted

Crontab not working as expected

Root password expired so i changed it to never expire and i must have wait a while to have cron working accordingly
  • 11
1 vote

Crontab not working as expected

not all versions of cron support the step extension. check the crontab(5) man page to see what your version supports. man 5 crontab if you can't use */10 you'll have to do it the long way - with a ...
  • 666
1 vote
Accepted

What time is used when I set crontab @daily?

@daily means midnight every day The information is documented in the manual $ man 5 crontab If you want change this value you can use the first five fields: m h dom mon dow usercommand 0 0 * * * ...

Only top scored, non community-wiki answers of a minimum length are eligible