UntouchedWagons Posted October 20, 2017 Share Posted October 20, 2017 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 Quote Link to comment
Squid Posted October 20, 2017 Share Posted October 20, 2017 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 1 Quote Link to comment
UntouchedWagons Posted October 21, 2017 Author Share Posted October 21, 2017 Here's the thing though, my script doesn't use mdcmd. If I run my script manually it runs just fine Quote Link to comment
Squid Posted October 21, 2017 Share Posted October 21, 2017 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 Quote Link to comment
UntouchedWagons Posted October 21, 2017 Author Share Posted October 21, 2017 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. Quote Link to comment
chip Posted October 11, 2018 Share Posted October 11, 2018 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? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.