[solved] Multiple scheduled actions at different times
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
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
[solved] Multiple scheduled actions at different times
If I wanted to do 2 different things at 2 different times, for example restart the browser ar 5PM and reboot the PC at 4AM what would I put in scheduled_actions? I just thought I could write a script that checks the time - but is there a simpler way?
Last edited by kryptus on 31 Oct 2017, 21:01, edited 1 time in total.
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Multiple scheduled actions at different times
You can use following syntax for the action:
Example:
If you need full cron functionality (different actions per day of month/year, etc) then you can inject cron jobs directly to the crontab using run_command parameter:
Thanks
Code: Select all
command1; sleep $x; command2; sleep $x; command3
Code: Select all
scheduled_action=Monday-10:00 Tuesday-10:00 Wednesday-10:00 Thursday-10:00 Friday-10:00 Saturday-10:00 Sunday-10:00 action:killall chrome; sleep 270m; killall chrome; sleep 4h; halt
Code: Select all
run_command=echo '0 9 * * 1-5 root command' >> /etc/crontab; echo '0 10 * * SAT,SUN root command' >> /etc/crontab
Please add [Solved] to your thread title if the solution was found.