OPENWRT Automaattinen boottaus
Seuraavilla komennoilla saat openwrt:n boottaamaan automaattisesti haluamanasi ajankohtana:
export EDITOR=nano (vaihtaa editorin nano:ksi)
crontab -e (pääset luomaan ajastetun komennon NANO editorilla)
0 4 * * * reboot now (lisää rivi tiedostoon ja tallenna. Automaattinen boottaus joka päivä klo 04:00)
-----------------------------------------------------------------------------------
The first number denotes the minute (0-59). In this case, 0 represents the top of the hour.
The second number denotes the hour (0-23). In this case, 3 represents 3 AM.
The third number denotes the day of the month (1-31). In this case, * matches any day of the month,
so this field is ignored.
The fourth number denotes the month of the year (1-12). In this case, * matches any day of the
month, so this field is ignored.
The fifth number denotes the day of the week (0-6) beginning with Sunday. In this case, 0 represents Sunday.
The final item is the command to be run. The crontab runs with root privileges, so it has power to reboot the device. A full path, as well as arguments, can be entered here if desired.
export EDITOR=nano (vaihtaa editorin nano:ksi)
crontab -e (pääset luomaan ajastetun komennon NANO editorilla)
0 4 * * * reboot now (lisää rivi tiedostoon ja tallenna. Automaattinen boottaus joka päivä klo 04:00)
-----------------------------------------------------------------------------------
The first number denotes the minute (0-59). In this case, 0 represents the top of the hour.
The second number denotes the hour (0-23). In this case, 3 represents 3 AM.
The third number denotes the day of the month (1-31). In this case, * matches any day of the month,
so this field is ignored.
The fourth number denotes the month of the year (1-12). In this case, * matches any day of the
month, so this field is ignored.
The fifth number denotes the day of the week (0-6) beginning with Sunday. In this case, 0 represents Sunday.
The final item is the command to be run. The crontab runs with root privileges, so it has power to reboot the device. A full path, as well as arguments, can be entered here if desired.