good morning,
I’m calling for help because I don’t understand anything.
I’m trying to trigger a cron script and it’s not working.
First of all, I had to install cronie, because cron was not installed and not in the repositories either.
I double-checked the scheduled time, the script path, the script permissions, to have only absolute paths in the script, and created an output log with an absolute path. Absolutely nothing happens!
I’m thinking of a cron job execution environment problem, but I don’t know where to look,
There are of course systemd units, which work very well, but I would like to test for another environment (pro) where only cron tasks are used.
If you created a script like example.sh - made it executable (chmod +x example.sh) - and copied it to e.g. /etc/cron.daily - you may have forgotten:
the file mustn’t have the .sh filename extension?
→ mv example.sh /etc/cron.daily/example
Just a thought.
Second:
You may have to install cronie and (start) enable it’s service.
I must be confused, I usually use this syntax in cron
08 15 * * 1-5 /home/falke/Bureau/myscript.sh
I had no access to the crontab until I installed cronie, now I can create a crontab and edit it but you’re talking about another configuration file? I’m at a loss, with all these task schedulers, I need to use the silly, classic crontab
thanks, well that’s my difficulty, under systemd even cron is considered a service to be started.
My “big” problem I think is to figure out everything that involves starting a systemd service
Not sure here. Did you reboot, after enabling the service?
If, not after rebooting your computer - please show the output of this:
‘sudo systemctl status cronie.service’
You did not say, what this user-script you have running twice is all about, how did it get started (potentially twice), etc. - So I’m out of knowledge from within this thread, as you did not explain?
Potentially a misconfiguration in your crontab (I’ve never used crontabs but I always do it in the way I described above in the example)?