May 12, 20206 yr 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?
May 12, 20206 yr 7 minutes ago, Phoenix Down said: What's wrong with just adding a new entry into root user's crontab? It won't survive a reboot, unless you add the appropriate commands to /boot/config/go
May 12, 20206 yr Author 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! 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 May 12, 20206 yr by Phoenix Down
May 12, 20206 yr 4 hours ago, Phoenix Down said: What about the /boot/config/plugins/dynamix option others have mentioned? Preferred
May 12, 20206 yr Community Expert 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.
May 12, 20206 yr Author Just to confirm, the recommended way to add new cronjobs is to piggyback on /boot/config/plugins/dynamix by adding your own .cron files there?
May 12, 20206 yr 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
May 12, 20206 yr Author 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?
Archived
This topic is now archived and is closed to further replies.