Wifi Schedule does not wake up OpenWrt 21.02.0

Hi Gents,
I am using TP-Link Archer C6 v2 recently upgraded to OW 21.02.0.
But my Wifi Schedule did not want to wake up/start after night.
Before with previous OW 19.07.08 versions it was working.
I have to recent router by hardware button every morning until now.
My settings:
Crone jobs:

00 01 * * Mon,Tue,Wed,Thu,Fri /usr/bin/wifi_schedule.sh forcestop
00 02 * * Sat,Sun /usr/bin/wifi_schedule.sh forcestop
00 07 * * Mon,Tue,Wed,Thu,Fri /usr/bin/wifi_schedule.sh start
00 07 * * Sat,Sun /usr/bin/wifi_schedule.sh start

Any advice, how to solve it?
I have not seen clear answers on similar posts.
Thank you very much in advance for your professional help, as well as for your great work for OpenWrt software. Really appreciated!
Regards, Gregi

Does cron itself work?

Does the wifi_schedule.sh script have execute permissions?
Does it work if you execute it manually with the forcestop and start arguments?
How is this device connected to the internet?
Does it have the correct time?
Please post the contents of your wifi_schedule.sh file.

What happens when you replace Mon,Tue,... with 0...6?

See https://openwrt.org/docs/guide-user/base-system/cron#task_specification

@psherman: i hope that it not such obvious mistake. :slight_smile:
Time was UTC, now i changed to my zone, is synchronize with NTP server, but the time was correct. I will check tomorrow morning.

  • because of that, i will not send the other file, let's see

is there any command to check if cron service is working?
this does not work: # $ service crond status
-ash: $: not found

from different topic:
Do you know any post/link how to do hardening of OW?

You could either use the forum search, or create a new topic.

1 Like

And, if you are going to start your own thread, be sure to include your concerns, topology, requirements, and end-goal. OpenWrt is already fairly well hardened as a normal router for home use, but obviously it all depends on what you are doing with it.

Hi Gents,
Thank you very much for you help.
Looks like the issue was with time zone settings. it was UTC correct time. but when I changed to my zone.
Seems to work properly.
Wifi Schedule Logfile:
Wed Oct 6 21:29:26 CEST 2021 /usr/bin/wifi_schedule.sh cron
Thu Oct 7 02:00:00 CEST 2021 /usr/bin/wifi_schedule.sh forcestop
Thu Oct 7 07:00:00 CEST 2021 /usr/bin/wifi_schedule.sh start

System log:
Thu Oct 7 02:00:00 2021 cron.err crond[3530]: USER root pid 5942 cmd /usr/bin/wifi_schedule.sh forcestop
Thu Oct 7 02:00:00 2021 cron.err crond[5994]: crond (busybox 1.33.1) started, log level 5
Thu Oct 7 02:00:01 2021 daemon.notice hostapd: Remove interface 'wlan1'
Thu Oct 7 02:00:01 2021 daemon.notice hostapd: wlan1: interface state ENABLED->DISABLED
Thu Oct 7 07:00:00 2021 cron.err crond[5994]: USER root pid 6276 cmd /usr/bin/wifi_schedule.sh start
Thu Oct 7 07:00:01 2021 cron.err crond[6328]: crond (busybox 1.33.1) started, log level 5
Thu Oct 7 07:00:03 2021 daemon.notice hostapd: Configuration file: /var/run/hostapd-phy1.conf (phy wlan1) --> new PHY
Sorry, for bothering you with such small issue :slight_smile:
Anyway, thank you for the quick help.
Kind regards, G.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.