cron not working except as "run now"

Status
Not open for further replies.

Tim1962

Patron
Joined
Feb 26, 2015
Messages
281
Hi, I've seen a couple of other reports but not got a workaround here. I want to archive a backup from backup to backup.date. It works if I "run now" but cron doesn't trigger it. Any help appreciated

/bin/mv /mnt/NAS/backup/webserverbackups/webserverbackup /mnt/NAS/backup/webserverbackups/webserverbackup.$(date +"%Y%m%d")

Tried without bin, tried sudo at the start and it just sits there... Ticked all the boxes on the config page...

Cheers Tim

FreeNAS-9.3-STABLE-201502070132
 
Joined
Dec 18, 2015
Messages
1
I have the exact same problem. I set up some shell scripts to run, check the boxes, but nothing runs at the scheduled time. The jobs will run OK when I select the job and then click on 'Run Now'. Running FreeNAS 9.3 STABLE.

Any advise on how to debug?
 

Tim1962

Patron
Joined
Feb 26, 2015
Messages
281
This worked instead

cp -R /mnt/NAS/backup/webserverbackup/backups/ /mnt/NAS/backup/webserverbackup/backupsarchive-monthly/
 

ethereal

Guru
Joined
Sep 10, 2012
Messages
762

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Yep, the best thing to do is to put your commands in a script file and execute this file from the CRON, that way you'll not have any problems ;)
 
Status
Not open for further replies.
Top