What is the best way of using systemd-run in place of a simple
sudo -u xxx at -f backupJ-447.cmd 03:10
Our org has gone systemd mad and no longer installs 'at', 'batch' and cron is depricated on our new systems. I need a way to scheule occasional "one-off" file copies to happen in the middle of the night. I tried the following
sudo systemd-run --unit=backupJ-477.cmd --on-calendar 03:10 sudo -u xxx /home/me/backupJ-477.cmd
But the job is permanent and runs every night. If I delete the job its unit name is somehow still persistent and cant be reused. If I dont give it a unit name I end up with dozens of random unit or job numbers which I cant review to see what they do/did.
Asked by ferg
(141 rep)
Jul 13, 2021, 06:59 AM
Last activity: May 24, 2022, 10:14 AM
Last activity: May 24, 2022, 10:14 AM