Hi I have installed flexget on my RT-N66U using this generic openwrt guide:
http://flexget.com/wiki/InstallWizard/OpenWrt
It all runs perfectly when I run it manually but I want to set it up to run every hour using crontab. Ive read the readme file RMerlin created for crond on asuswrt:
https://github.com/RMerl/asuswrt-mer...DME-merlin.txt
And have come up with a script:
Create init-start file
Command inside init-start file to copy cron job file from jffs to ram
Save/exit nano then make init-start executable
Creating cron job file
Command inside cron job file
Save exit nano
Will this work? - Im very new to linux and this is my first time deviating from a guide :eek:
Do I need to do anything to the cronjob file once its in the ram to get it to run?
http://flexget.com/wiki/InstallWizard/OpenWrt
It all runs perfectly when I run it manually but I want to set it up to run every hour using crontab. Ive read the readme file RMerlin created for crond on asuswrt:
https://github.com/RMerl/asuswrt-mer...DME-merlin.txt
Quote:
* Crond * Crond will automatically start at boot time. You can put your cron tasks in /var/spool/cron/crontabs/ . The file must be named "admin" as this is the name of the system user. Note that this location resides in RAM, so you would have to put your cron script somewhere such as in the jffs partition, and at boot time copy it to /var/spool/cron/crontabs/ using an init-start user script. A simple way to manage your cron jobs is through the included "cru" command. Just run "cru" to see the usage information. You can then put your "cru" commands inside a user script to re-generate your cron jobs at boot time. |
Create init-start file
Code:
nano -w /jffs/scripts/init-start
Code:
#!/bin/sh
cp /jffs/scripts/ADMIN_USERNAME /var/spool/cron/crontabs/ADMIN_USERNAME
Code:
chmod a+rx /jffs/scripts/init-start
Creating cron job file
Code:
nano -w /jffs/scripts/ADMIN_USERNAME
Code:
@hourly /opt/bin/flexget --cron
Will this work? - Im very new to linux and this is my first time deviating from a guide :eek:
Do I need to do anything to the cronjob file once its in the ram to get it to run?