gberg Posted February 12, 2020 Share Posted February 12, 2020 (edited) I adden a daily cron job to copy a folder from a UNRAID share to my backup NAS, and it works fine and I can even see it in the Dynamix Schedules plugin. But what happens after a reboot, will the cron job still be there, cause the linux systen is run from RAM, right? Edited February 12, 2020 by gberg Quote Link to comment
itimpi Posted February 12, 2020 Share Posted February 12, 2020 1 minute ago, gberg said: I adden a daily cron job to copy a folder from a UNRAID share to my backup NAS, and it works fine and I can even see it in the Dynamix Schedules plugin. But what happens after a reboot, will the cron job still be there, cause the linux systen is run from RAM, right? If you manually added it then it will NOT survive a reboot. If you add it via the User Scripts plugin then it WILL survive a reboot. Quote Link to comment
gberg Posted February 12, 2020 Author Share Posted February 12, 2020 Ah, ok. I added it manually, I have to look into the User Scripts plugin then, thanks! Quote Link to comment
itimpi Posted February 12, 2020 Share Posted February 12, 2020 6 minutes ago, gberg said: Ah, ok. I added it manually, I have to look into the User Scripts plugin then, thanks! That is definitely a plugin that is worth installing There are other ways to make a script survive a reboot but the User Scripts plugin is by far the easiest. Quote Link to comment
gberg Posted February 12, 2020 Author Share Posted February 12, 2020 Yeah, I installed it, and I noted it placed a new cron job in the /etc/cron.daily folder, and that will be placed there on every reboot I presume? Quote Link to comment
itimpi Posted February 12, 2020 Share Posted February 12, 2020 28 minutes ago, gberg said: Yeah, I installed it, and I noted it placed a new cron job in the /etc/cron.daily folder, and that will be placed there on every reboot I presume? The plugin handles re-installing everything after a reboot for all the scripts it is handling. Which cron folder it ends up in depends on the scheduling option you select in User Scripts, but the nice thing is that you do not need to worry about that level of detail if using the plugin. Quote Link to comment
dboonthego Posted February 12, 2020 Share Posted February 12, 2020 As has already been said, the user scripts plugin is the easiest method, but here is a manual alternative for those who don't like to take the easy way. Export desired crontab settings to a file on your flash stick: crontab -l > /boot/config/cron.txt Add the following line to your go script at /boot/config/go crontab /boot/config/cron.txt 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.