Ryan2207 Posted October 10, 2016 Share Posted October 10, 2016 Hello All Does anyone know a simple method to make cron jobs remain after a reboot ? Kind Regards Ryan Quote Link to comment
Ryan2207 Posted December 11, 2016 Author Share Posted December 11, 2016 Bump, i've tried using the schedulers plugin and creating a name.cron text file with the rsync command i want to use but its not running Quote Link to comment
John_M Posted December 11, 2016 Share Posted December 11, 2016 Have you looked at the User Scripts plugin? Quote Link to comment
wgstarks Posted December 11, 2016 Share Posted December 11, 2016 Did you try this- https://lime-technology.com/forum/index.php?topic=43289.msg413238#msg413238 Quote Link to comment
Squid Posted December 11, 2016 Share Posted December 11, 2016 ^^^ This Or alternatively, add the appropriate crontab commands to the "go" file (/boot/config/go) Quote Link to comment
Ryan2207 Posted December 12, 2016 Author Share Posted December 12, 2016 i added a file with the .cron externtion to /config/plugins/dynamix but it didn't run it was a simple rsync command "45 17 * * 6 rsync -av /path/to/folder /path/to/folder" command did not execute at 5:45 Quote Link to comment
GroxyPod Posted December 12, 2016 Share Posted December 12, 2016 make a .cron file and place it in your /flash/config/plugins/dynamix folder. To activate it, type update_cron within an ssh session. This will cause it to be added to the cronjobs immediately without the need to reboot. The cron file needs to be formatted like so (This cron example will run at 10AM every Friday): 0 10 * * 5 command &> /dev/null Quote Link to comment
Ryan2207 Posted December 14, 2016 Author Share Posted December 14, 2016 I'll be trying that out today thank you so much, will this allow for mailto to be added aswell ? Quote Link to comment
trurl Posted December 14, 2016 Share Posted December 14, 2016 I'll be trying that out today thank you so much, will this allow for mailto to be added aswell ? See here for example. Quote Link to comment
Ryan2207 Posted December 14, 2016 Author Share Posted December 14, 2016 Is there a way to configure that for when the job completes ? Quote Link to comment
trurl Posted December 14, 2016 Share Posted December 14, 2016 Is there a way to configure that for when the job completes ? Make a script that does whatever you want. In the script, include the notify at the end so that when you run the script, you get the notification. Call the script from the .cron file. Done Quote Link to comment
Ryan2207 Posted December 18, 2016 Author Share Posted December 18, 2016 I like the idea, thought to be honest im not 100% sure of how to write it, could i trouble you for an example ? Basically what i want to do is have the cronjob output a log file then email a copy to me either as an attachment or the the body of text Cheers Quote Link to comment
trurl Posted December 19, 2016 Share Posted December 19, 2016 I'm certainly not the best for scripting. If you search (see How to Search in my sig) for script/notify you will see other examples of people using notify. The main thing I don't know is how you intend to produce the log file you want to include in the email, and that is going to be something that is specific to your use. Quote Link to comment
jameson_uk Posted June 18, 2020 Share Posted June 18, 2020 On 12/12/2016 at 6:50 AM, GroxyPod said: make a .cron file and place it in your /flash/config/plugins/dynamix folder. To activate it, type update_cron within an ssh session. This will cause it to be added to the cronjobs immediately without the need to reboot. The cron file needs to be formatted like so (This cron example will run at 10AM every Friday): 0 10 * * 5 command &> /dev/null So I have this working with something I wanted to CRON but is there a way to tell this schedule is setup? crontab -l doesn't show up the job but it is running Quote Link to comment
remotevisitor Posted June 18, 2020 Share Posted June 18, 2020 (edited) The best way to achieve this is to use the “User Scripts" plugin. Update: just read the earlier posts and realized this was already suggested. Edited June 18, 2020 by remotevisitor Quote Link to comment
Squid Posted June 19, 2020 Share Posted June 19, 2020 19 hours ago, jameson_uk said: On 12/12/2016 at 1:50 AM, GroxyPod said: So I have this working with something I wanted to CRON but is there a way to tell this schedule is setup? cat /etc/cron.d/root 1 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.