The chmod you run on the file in your terminal, just once to set the execute bit on the file. It’s not part of the script or the cronjob
Done, but it seems task scheduler is still not happy with it not being a ‘program.’
I ran chmod +x /home/beatrix/Desktop/shutdowntest.sh
and the terminal returned empty, so I assume it worked.
How does sudo
work in a cron job with no interactivity to prompt the user for a password?
This is all moot since Task Scheduler seems to refuse to run .sh scripts, but I tried double clicking the script → Launch, and it didn’t work. I ran it in terminal and it asked for my sudo password and then shutdown once I input it.
I created this forum account a few minutes before posting, apparently I have reached the maximum amount of replies today for a new account. Urgh.
Good point, and stupid of me. But since Fedora apparently lets users execute the shutdown command the sudo part is not needed.
Yeah. It’s not obvious to me why this isn’t working. KCron seems to have written appropriate entries into the crontab for the tasks being configured.
@paradiseJumper it looks like your logs may be purged quite aggressively, but if you are able to capture something from a time when the job should have run, that would be interesting.