KsWoodsMan
Regular Contributor
I don't kow if 'cru' works with commas to specify minutes, hours, day, month or week.
But it does work with the wild card "*" in each of the time fields.
Typing 'cru' in a terminal connected to my router reports back
and 'cru l' gives me
My log rotation script runs daily at 3:01 AM
The 'get_MVPS' is a shell function set to run at 23:59 on the 2nd day of the month to get blocking host files from the internet.
It doesn't run without a path. (I'll fix that someday)
(The third line was added during edit as an example of what to expect to see.)
While knowing the IP address of the heatpump, would this in the startup scripts of the RT-AC68U, used as the wireless router, get that job done ?
EDIT: If the unique identifier has white space, both of the statements need to be encapsulated separately inside quotes.
Otherwise use a single word or underscores to replace whitespace in the unique identifier and quotation marks for the rest, including the command.
This should run once every minute to ping the heatpump 5 times and stop. The output from ping would be sent to /dev/null so it doesn't show up somewhere unexpected.
Not in the RT-N12E's start ups. His nvram.txt doesn't show them to have any jffs parts and no USB available to mount.
But the RT-AC68U should have the 3
script_usbhotplug=
script_usbmount=
script_usbumount=
still available if a USB disk is plugged in the main router.
But it does work with the wild card "*" in each of the time fields.
Typing 'cru' in a terminal connected to my router reports back
Code:
# cru
Cron Utility
add: cru a <unique id> <"min hour day month week command">
delete: cru d <unique id>
list: cru l
Code:
# cru l
1 3 * * * /opt/sbin/log_rotate #log rotate#
59 23 2 * * get_MVPS #get hosts files#
* * * * * /bin/ping -c5 192.168.2.40 #ping heatpump#
My log rotation script runs daily at 3:01 AM
The 'get_MVPS' is a shell function set to run at 23:59 on the 2nd day of the month to get blocking host files from the internet.
It doesn't run without a path. (I'll fix that someday)
(The third line was added during edit as an example of what to expect to see.)
While knowing the IP address of the heatpump, would this in the startup scripts of the RT-AC68U, used as the wireless router, get that job done ?
Code:
cru a "ping heatpump" "* * * * * /bin/ping -c5 ${heatpump_IP_address} >/dev/null"
Otherwise use a single word or underscores to replace whitespace in the unique identifier and quotation marks for the rest, including the command.
This should run once every minute to ping the heatpump 5 times and stop. The output from ping would be sent to /dev/null so it doesn't show up somewhere unexpected.
Not in the RT-N12E's start ups. His nvram.txt doesn't show them to have any jffs parts and no USB available to mount.
But the RT-AC68U should have the 3
script_usbhotplug=
script_usbmount=
script_usbumount=
still available if a USB disk is plugged in the main router.
Last edited: