What's new

Scheduling rebooting??

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

i used notepad++ saved as init-start no file extension

with winscp i transfer the file to /jffs/scripts/

after that i deactivated ssh
 
Open your original init-start file on your PC with notepad++.

Make sure Encoding is set to "Encode in ANSI" or "Encode in UTF-8 without BOM".

Go to Edit > EOL Conversion. Select UNIX/OSX Format and save the file.

Copy the file onto your router.
 
Last edited:
it didnt worked :(
JFFS enabled
custom script enabled

init-start file created with

#!/bin/sh
cru a ScheduledReboot "0 4 * * * /sbin/reboot"

added in /jffs/scripts/

chmod 0755 for the file only

and router manual restarted
Try this instead:

Scheduled Reboot

1) Enable JFFS + Format JFFS + Enable JFFS custom scripts and configs (if this option is present) + Telnet on the Administration -> System page, then reboot.
2) Download the software called Putty (should be easy to find on Google)
3) Using Putty, connect using the Telnet protocol to your router's IP (probably 192.168.1.1) Username and password are the same as for the webui.
4) Type the following, one line at a time:

cat << EOF > /jffs/scripts/services-start
#!/bin/sh
/usr/sbin/cru a ScheduledReboot "0 4 * * * reboot"
EOF

Set 0 (minutes) and 4 (hour) to the desired reboot time, for a daily reboot. Those arguments are:
"min hour day month week command"
After this you will be back to the prompt. Now run this:

chmod a+rx /jffs/scripts/services-start
/jffs/scripts/services-start

That will set up the cron job. Every time you reboot the router, the reboot task will be re-established.
To remove the task:

rm /jffs/scripts/services-start
cru d ScheduledReboot

Good luck!
 
Actually, here's an easy way for you to create that schedule.

1) Enable JFFS + Format JFFS + Telnet on the Administration -> System page, then reboot.
2) Download the software called Putty (should be easy to find on Google)
3) Using Putty, connect using the Telnet protocol to your router's IP (probably 192.168.1.1) Username and password are the same as for the webui.
4) Type the following, one line at a time:

Code:
cat << EOF > /jffs/scripts/services-start
#!/bin/sh
/usr/sbin/cru a ScheduledReboot "0 6 * * * reboot"
EOF

Set 0 (minutes) and 6 (hour) to the desired reboot time, for a daily reboot. Those arguments are:

"min hour day month week command"

After this you will be back to the prompt. Now run this:

Code:
chmod a+rx /jffs/scripts/services-start
/jffs/scripts/services-start

That will set up the cron job. Every time you reboot the router, the reboot task will be re-established.

To remove the task:

Code:
rm /jffs/scripts/services-start
cru d ScheduledReboot

Hi I followed the above, but the cron job doesn't seem to be saved. I can see the script is still there.

Code:
admin@RT-N66U-6AC0:/tmp/home/root# cru l

admin@RT-N66U-6AC0:/tmp/home/root# cat /jffs/scripts/services-start

/usr/sbin/cru a ScheduledReboot "0 4 * * * reboot"

admin@RT-N66U-6AC0:/tmp/home/root# ls -l /jffs/scripts

-rwxrwxrwx    1 admin    root            51 Jun  7 11:15 services-start

I'm using "[Fork] Update for 374.43 available" by john9527.

Does this only work with Merlin's firmware?
 
Hi I followed the above, but the cron job doesn't seem to be saved. I can see the script is still there.

Code:
admin@RT-N66U-6AC0:/tmp/home/root# cru l

admin@RT-N66U-6AC0:/tmp/home/root# cat /jffs/scripts/services-start

/usr/sbin/cru a ScheduledReboot "0 4 * * * reboot"

admin@RT-N66U-6AC0:/tmp/home/root# ls -l /jffs/scripts

-rwxrwxrwx    1 admin    root            51 Jun  7 11:15 services-start

I'm using "[Fork] Update for 374.43 available" by john9527.

Does this only work with Merlin's firmware?

That script is missing the very first line, with #!/bin/sh
 
Will work fine on the fork......you forgot to type in the shebang,

#!/bin/sh

as part of the script
 
Hello All.

Would like to also add my request that this be made into a GUI control/feature of the firmware. There is no fixing stupid but for the rest of us, having this available in the GUI would really be helpful. Just migrated over from Tomato and so far 378.55 is running great. Thanks RMerlin.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top