Jump to content

Adding new cronjob


Recommended Posts

Hi all, just finished building my new Unraid box and wanted to set up Dynamic DNS. To do so, I just need to do a curl call to a REST endpoint periodically. My work environment is Linux so I'm knee deep in it everyday. So naturally, I started dropping down into the command line to add a line to the crontab. But then, I saw that some threads recommend adding .cron files into /boot/config/plugins/? I looked in the official docs and did not find any guidance on crons. What's wrong with just adding a new entry into root user's crontab?

Link to comment
9 minutes ago, Squid said:

It won't survive a reboot, unless you add the appropriate commands to /boot/config/go

My first Unraid forum reply, by the the infamous Squid no less! :D

 

Looks like /boot/config/go just runs a list of commands on startup, right? Are you saying I should write a small script to append my cron entries to the crontab and have that run on startup?

 

What about the /boot/config/plugins/dynamix option others have mentioned? I see a bunch of .cron files there already.

Edited by Phoenix Down
Link to comment
5 hours ago, Phoenix Down said:

What about the /boot/config/plugins/dynamix option others have mentioned? I see a bunch of .cron files there alread

Don’t worry about the others.    Whatever is responsible for them will already be set up to re-establish them on a reboot.

Link to comment

If you know what you're doing (and since you know what cron is and crontab etc), then yes.  For everyone else user scripts plugin is the way to go  (although it has further options like only run at array start that can't be done via cron)

 

And after you add it then

 

update_cron

Link to comment
1 hour ago, Squid said:

If you know what you're doing (and since you know what cron is and crontab etc), then yes.  For everyone else user scripts plugin is the way to go  (although it has further options like only run at array start that can't be done via cron)

 

And after you add it then

 


update_cron

Got it, thanks! I was about to ask about User Scripts next. 

 

So I run "update_cron" after I add a new .cron in /boot/config/plugins/dynamix? Do I need to run "update_cron" after after reboot, or just once?

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.

×
×
  • Create New...