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!

"0 6 2 * *"

You want Tuesday, of any month (*) and any week (*).




"0 6 2 * 1"

Would be the Tuesday, of any month (*), the first week (1).

That's at least the theory. The "week" parameter isn't a standard cron parameter AFAIK, might be specific to the crond build in Busybox I guess.

Hi Sorry to bother you and I apologize for bumping such an old topic. I started learning merlin and its capabilities from this very own forum topic.

If I want Tuesday, of any month (*) and any week (*), it would be:
0 6 * * 2
Isnt it?

I was a bit confused.
 
It's:
min hour day month week

Code:
# cru

Cron Utility
add:    cru a <unique id> <"min hour day month week command">
delete: cru d <unique id>
list:   cru l
 
It's:
min hour day month week

Code:
# cru

Cron Utility
add:    cru a <unique id> <"min hour day month week command">
delete: cru d <unique id>
list:   cru l


I tried for my own reboot schedule "0 5 3 * *" I wanted to reboot every Wednesday 5AM.
But this script rebooted my router yesterday at 5am. May 3rd.

http://www.openjs.com/scripts/jslibrary/demos/crontab.php
And this generator also tells me to change the "week" part instead of the "day."

"0 5 * * 3" ?

Still confused.
 
It did exactly what you told it....
min = 0, hour = 5, day of month = 3, month = any, day of week = any

You want "0 5 * * 3"

(for day of week, Sunday is either 0 or 7)
 
It did exactly what you told it....
min = 0, hour = 5, day of month = 3, month = any, day of week = any

You want "0 5 * * 3"

(for day of week, Sunday is either 0 or 7)

RMerlin had it "0 X X * *" this way but "X X * * X" seems the right one for what I want to do. Thanks a lot!
 
Last edited:
It did exactly what you told it....
min = 0, hour = 5, day of month = 3, month = any, day of week = any

You want "0 5 * * 3"

(for day of week, Sunday is either 0 or 7)
Good spot John. Perhaps "cru l" should say "day-of-week" instead of "week" to avoid confusion.

Regarding RMerlin's comment that "week" is non-standard. This has been the standard format in every version of Unix I've come across.
 
Last edited:
will this guide http://www.snbforums.com/threads/scheduling-rebooting.11044/#post-68429 work with 378.53 ?

im bit confused because Enable JFFS partition is already activated standard


i need activate the both menus too?

Format JFFS partition at next boot
Enable JFFS custom scripts and configs


in the wiki it say:

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

Put this inside an init-start user script.

i need create a file with notepad++? save it as (txt, sh.)?
 
will this guide http://www.snbforums.com/threads/scheduling-rebooting.11044/#post-68429 work with 378.53 ?

im bit confused because Enable JFFS partition is already activated standard


i need activate the both menus too?

Format JFFS partition at next boot
Enable JFFS custom scripts and configs


in the wiki it say:

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

Put this inside an init-start user script.

i need create a file with notepad++? save it as (txt, sh.)?

I know I'm not in a place to give someone a tip about merlin as I just learned it but I successfully have this done so maybe I'll give it a go.

Use the putty.exe as mentioned by Rmerlin and connect with telnet. Have those codes entered one line at a time. And it creates the .sh for you.
 
colin it didnt work

i created a file init-start no extension there i add

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

put it in /jffs/scripts/ and rebooted router
 

Attachments

  • jffs.png
    jffs.png
    52.2 KB · Views: 757
Creating scripts
Don't forget to set any script you create as being executable:

chmod a+rx /jffs/scripts/*
 
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
 

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