Trouble with cron

any reason why 35 16 * * * sh /home/lou/backup_thux_USB.sh should not run. the sh is executable, it sits in /home/lou. The script does it’s job in the shell and via doubleclick just not in crontab

What does your cron log say?

Perhaps you need to specify the full paths to all commands, including the shell?

Then again, why don’t you just make the script executable and have only that run (without the shell part in the cron command)?

I think I tried every permutation (w/out sh w/ sh w/ ./ w/out ./ full path ) of starting the script, and yes it’s executable. Have not checked the log though.

  1. Sep 2017 17:48 von noreply@forum.restic.net:

And what does your logs say, when cron attempts to run this?

stupid thing, I had to use/usr/local/bin/restic and not restic only in the script for the cronjob.
an yeah, ~/backup_thux.USB.sh in crontab works. So cronjob is somehow inconsistent I’d say

Yeah, cron runs with a very limited PATH by default. Look at the crontab(5) manpage for the details and instructions for setting the PATH in the cronfile if you like.

But having your backup script set PATH or use an explicit pathname is probably the correct solution.