Hi, I’m trying to use Kcron, a.k.a. KDE Task Scheduler for automated, scheduled shutdowns on Fedora 42 Plasma Desktop. I’ve seemingly configured everything correctly, but it just won’t run the commands at the scheduled times. I need help getting it to work, or recommendations for an alternative GUI that can do regularly scheduled shutdowns.
If I check “When system starts,” it grays out all the scheduling options, so it seems to be in the literal sense where it would shutdown my computer as soon as it starts, lol
I guess this should show something for the test task I have scheduled to run an automated shutdown every 5 minutes every hour, but I don’t see anything. (This task has existed and been enabled for months)
I have tried running it in the system tab as root, but no dice. But maybe I configured something wrong, so here’s a screenshot. I am not sure how to format adding sudo to a command that’s run from a filepath.
Oh true. I guess I had the test version of that task set to specific times at first, and only changed it to every 5 minutes today.
I think the previous boot is not very helpful here because I had restarted my computer to complete updates before shutting it down, so uptime was only about a minute. As for the boot before that boot, it should have shut down at 12AM and didn’t, but we don’t have logs for that.
$ cat /etc/systemd/system/systemd-poweroff.timer
[Unit]
Description=Poweroff every work day
[Timer]
# Power off in working days at 23:00
OnCalendar=Mon,Tue,Wed,Thu,Fri *-*-* 23:00:00
[Install]
WantedBy=timers.target
Then do a systemctl enable systemd-poweroff.timer followed by systemctl start systemd-powerff.timer
I tried creating a .sh script using your code, but selecting it in task scheduler grays out the option to apply changes and says “choose a program to run”