scheduled action works only every second day

Post bug reports related to either the kiosk ISO or the kiosk wizard here.
Forum rules
Porteus Kiosk section of the forum is unmaintained now. Its kept in a 'read only' mode for archival purposes.
Please use the kiosk contact page for directing your queries: https://porteus-kiosk.org/contact.html
Karesz
White ninja
White ninja
Posts: 6
Joined: 18 Mar 2019, 08:55
Distribution: Porteus Kiosk 4.8.0

scheduled action works only every second day

Post#1 by Karesz » 18 Mar 2019, 09:25

Hello all!

Few weeks ago I installed a kiosk with Porteus Kiosk 4.8.0 in a school to display teacher replacement.
Everything works fine with that.

For power saving reasons I scheduled automatic actions from remote TXT file management:
"scheduled_action=Monday-16:00 Tuesday-16:00 Wednesday-16:00 Thursday-16:00 Friday-16:00 Saturday-07:00 Sunday-07:00 action:echo mem > /sys/power/state"

The promlem is very interesting.
The scheduled actions written above works only on every second day...

So that means:
Monday goes to mem powersate succesfully
Tuesday DOESN'T go to mem powerstate :wall:
Wednesday goes to mem powersate succesfully
Thursday DOESN'T go to mem powerstate :wall:
Friday goes to mem powersate succesfully
Saturday DOESN'T go to mem powerstate :wall:
Sunday goes to mem powersate succesfully

What am I missing or doing wrong? :sos:

PS:
The machine is: Asus ET1611 AIO
The motherboard only knows "RESUME ON RTC ALARM", so thats why I set echo mem > /sys/power/state instead of poweroff.
And my timezone/NTP from remote TXT file management is:
"timezone=Europe/Budapest"

Thanks:
Karesz
Hungary

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

scheduled action works only every second day

Post#2 by fanthom » 18 Mar 2019, 14:04

Suspend to RAM may confuse scheduled actions parameter.

Better do full power off and RTC wake as your motherboard supports it:
https://porteus-kiosk.org/parameters.html#rtc_wake

Thanks
Please add [Solved] to your thread title if the solution was found.

Karesz
White ninja
White ninja
Posts: 6
Joined: 18 Mar 2019, 08:55
Distribution: Porteus Kiosk 4.8.0

scheduled action works only every second day

Post#3 by Karesz » 18 Mar 2019, 14:27

Unfortunately the mobo supports only rtc resume.

Any advice instead of suspend to ram?
cat /sys/power/state indicates: standby not availalble

Maybe echo disk > /sys/power/state ? :hmmm:

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

scheduled action works only every second day

Post#4 by fanthom » 18 Mar 2019, 15:31

In this case you would need to program cron daemon using 'run_command=' as explained here:
https://porteus-kiosk.org/faq.html#22
Please add [Solved] to your thread title if the solution was found.

Karesz
White ninja
White ninja
Posts: 6
Joined: 18 Mar 2019, 08:55
Distribution: Porteus Kiosk 4.8.0

scheduled action works only every second day

Post#5 by Karesz » 19 Mar 2019, 07:14

Thanks!

Is this correct, if I would like to send the machine to mem on weekdays at 16:00 and on weekends at 7:00? (bios only support every day or one day, so the rtc resume time is 6:55 am)

run_command=echo '0 16 * * 1-5 root su - -c "echo mem > /sys/power/state"' >> /etc/crontab; echo '0 7 * * SAT,SUN root su - -c "echo mem > /sys/power/state"' >> /etc/crontab :hmmm:

And my further questions are:
Should I remove the scheduled_action= line?
And, is there a specific place for run_command= line, or can I paste where I want in the config TXT file?

Thanks again Fanthom!
Last edited by Karesz on 19 Mar 2019, 08:56, edited 1 time in total.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

scheduled action works only every second day

Post#6 by fanthom » 19 Mar 2019, 08:18

"Is this correct, if I would like to send the machine to mem on weekdays at 16:00 and on weekends at 7:00? "
Seems to be ok.

"Should I remove the scheduled_action= line?"
Yes

"is there a specific place for run_command= line, or can I paste where I want in the config TXT file?"
Anywhere in the config (unless you have nested configurations enabled, if yes then specific rules apply).
Please add [Solved] to your thread title if the solution was found.

Karesz
White ninja
White ninja
Posts: 6
Joined: 18 Mar 2019, 08:55
Distribution: Porteus Kiosk 4.8.0

scheduled action works only every second day

Post#7 by Karesz » 19 Mar 2019, 08:33

I upgraded the config file.
I'm going to inform you from the news : - )

Thx a lot!

Karesz
White ninja
White ninja
Posts: 6
Joined: 18 Mar 2019, 08:55
Distribution: Porteus Kiosk 4.8.0

scheduled action works only every second day

Post#8 by Karesz » 19 Mar 2019, 08:55

Sorry, a last question:

One thing is not clear:
Do I need to put echo mem > /sys/power/state command between quotes " "?

Like:
run_command=echo '0 16 * * 1-5 root su - -c "echo mem > /sys/power/state"' >> /etc/crontab; echo '0 7 * * SAT,SUN root su - -c "echo mem > /sys/power/state"' >> /etc/crontab

Or without " ":
run_command=echo '0 16 * * 1-5 root su - -c echo mem > /sys/power/state' >> /etc/crontab; echo '0 7 * * SAT,SUN root su - -c echo mem > /sys/power/state' >> /etc/crontab

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

scheduled action works only every second day

Post#9 by fanthom » 19 Mar 2019, 11:04

Do I need to put echo mem > /sys/power/state command between quotes " "?
Yes
Please add [Solved] to your thread title if the solution was found.

Karesz
White ninja
White ninja
Posts: 6
Joined: 18 Mar 2019, 08:55
Distribution: Porteus Kiosk 4.8.0

scheduled action works only every second day

Post#10 by Karesz » 21 Mar 2019, 19:40

Hello Fanthom!

Injecting into cron seems to work fine.
My kiosk goes to mem and wakes when it should.

Thanks again!
Lets develop this cool distro :celebrate3:

Locked