lasermole Posted July 27, 2017 Share Posted July 27, 2017 Hi all, Just got a LT last week, and liking it so far. Though my plan for it requires it be placed in a remote location I can't get into without some effort. That said I want to use cron to reboot the LT on a time schedule, either a specific time say 1AM EST, or after a certain amount of uptime. I've had no luck with the entries I've made into cron so far. ex. 0 1 * * * root reboot > /dev/null 2>&10 1 * * * /sbin/reboot If anybody can help me find a working cron reboot setup I'd be so very grateful! Thanks! lasermole. Quote Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted July 28, 2017 Share Posted July 28, 2017 It's possible, but the LT has to have some kind of server to refer to so that it can know what the time is, otherwise it will get confused about what the time is. That said, I haven't had much experience with an LT... Quote Link to comment Share on other sites More sharing options...
lasermole Posted July 28, 2017 Author Share Posted July 28, 2017 well from what I can tell the turtle uses NTPD and gets a accurate time after booting up. At this point I just want to know what correct command to input into cron to trigger a reboot? even if it happens at the wrong time, it'd be something. lasermole Quote Link to comment Share on other sites More sharing options...
lasermole Posted July 29, 2017 Author Share Posted July 29, 2017 Alright I got it working. NTP gets an accurate time. Though I had to edit /etc/config/system and change it to my time zone. As referenced at openwrt wiki --------------------------------------------------------------------------- config system option timezone 'EST5EDT,M3.2.0,M11.1.0' option hostname 'turtle' config timeserver 'ntp' list server '0.openwrt.pool.ntp.org' list server '1.openwrt.pool.ntp.org' list server '2.openwrt.pool.ntp.org' list server '3.openwrt.pool.ntp.org' option enabled '1' option enable_server '0' config led 'led_wan' option name 'WAN' option sysfs 'turtle:yellow:system' option trigger 'netdev' option dev 'eth1' option mode 'link tx rx' -------------------------------------------------------------- Then I also took a page from their wiki noting how to perform automatic reboots. So I edited my crontab to this: (will reboot automatically at 4:30AM) ----------------------------------------------------------------------- 30 4 * * * sleep 70 && touch /etc/banner && reboot ------------------------------------------------------------------------ And this worked perfectly! Hope this helps someone else too. I just can't be totally trusting of the turtle's reliability in the case of some lock up, or what not. So this will give me a chance to have it reboot nightly and re-connect if possible. Thanks all. lasermole Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.