(SOLVED) Will cron jobs stay after reboot?


gberg

Recommended Posts

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 by gberg
Link to comment
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.

Link to comment
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.

Link to comment

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

 

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.