October 20, 20178 yr I've got a bash script I want cron to run every night. I've tried putting the script in /etc/cron.daily/ which works fine but the script gets deleted if my server ever needs to reboot. If I put it in /boot/config/plugins/myscripts/ I get an email with the subject "cron for user root * /boot/config/plugins/myscripts/backblaze.sh" and body of "/bin/sh: mdcmd: command not found" I'm using unraid 6.3.5
October 20, 20178 yr I've got a bash script I want cron to run every night. I've tried putting the script in /etc/cron.daily/ which works fine but the script gets deleted if my server ever needs to reboot. If I put it in /boot/config/plugins/myscripts/ I get an email with the subject "cron for user root * /boot/config/plugins/myscripts/backblaze.sh" and body of "/bin/sh: mdcmd: command not found" I'm using unraid 6.3.5Easiest solution is to run the script on a custom schedule via the user scripts plugin.You may need to specify the complete path to mdcmd
October 21, 20178 yr Author Here's the thing though, my script doesn't use mdcmd. If I run my script manually it runs just fine
October 21, 20178 yr Here's the thing though, my script doesn't use mdcmd. If I run my script manually it runs just fineK. I'm assuming you're adding a file called something.cronThe .cron file is a cron expression and then the full path to the script you're runningE.g.:0 12 * * * /path/to/script.sh
October 21, 20178 yr Author Yup that's what I did. I had /boot/config/plugins/myscripts/backblaze.cron which pointed to /boot/config/plugins/myscripts/backblaze.sh. I'll try the CA User Scripts plugin.
October 11, 20187 yr I'm trying the same thing - cron file is in /boot/config/plugins/dynamix sh file is in same location I can run the sh file by going into /boot/config/plugins/dynamix and running ./script.sh and it runs but if I call it from my cron 49 14 * * * /boot/config/plugins/dynamix/script.sh I get bash: script.sh#: No such file or directory. What am I missing?
Archived
This topic is now archived and is closed to further replies.