You are not logged in.
Pages: 1
Hello, fellow Arch users!
I want on the 15th of August, 2022, for it to automatically run timedatectl set-timezone Europe/Dublin, as I'm moving to Ireland on that date, and I forget to do stuff, or just put it off.
How do I do this?
Offline
Offline
I want on the 15th of August, 2022, for it to automatically run timedatectl set-timezone Europe/Dublin, as I'm moving to Ireland on that date, and I forget to do stuff, or just put it off.
For one-time-shots I would prefer at, please don't do cronjobs for that purpose they get repeated (at least once a year).
For your example (all commands as root user):
pacman -S at
systemctl enable --now atd
echo "/usr/bin/timedatectl set-timezone Europe/Dublin" | at "05:00 08152022"See also: https://linuxhandbook.com/at-command/
Cheers
Dirk
P.S.: I did not find the fitting wiki page in Arch Linux Wiki.
Offline
For one-time-shots I would prefer at, please don't do cronjobs for that purpose they get repeated (at least once a year)
Good point - I call that system maintanance (use a crontab as a monthly reminder
).
If you move regularly without using a vpn, you could also set up a timer that determines the timezone using your ip with e.g. worldtimeapi.org
curl "https://worldtimeapi.org/api/ip" | jq -r .timezone| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Online
Pages: 1