What's the correct folder to put cron scripts in?


Recommended Posts

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

Link to comment



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


Easiest 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
  • Like 1
Link to comment
  • 11 months later...

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?

 

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.