Jump to content

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


UntouchedWagons

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
Link to comment
Here's the thing though, my script doesn't use mdcmd. If I run my script manually it runs just fine
K. I'm assuming you're adding a file called something.cron


The .cron file is a cron expression and then the full path to the script you're running

E.g.:

0 12 * * * /path/to/script.sh

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...