You are not logged in.
hi at all,
I have a problem with crontab. It does not run the script inside it. I created the crontab with the command
crontab -e
.
If I give
crontab -l
it displays the content correctly.
This is my crontab:
#
@reboot /home/sergio/restic_link.sh
#
# runs the script every 2 hours
* */2 * * * /home/sergio/restic_link.sh
#
If I manually run the script, it works.
Where am I going wrong?
Thanks.
Last edited by m3nhir (Yesterday 12:24:57)
Intelligence is not making mistakes, but find out how to profit immediately.
Offline
do you get an error?
Offline
do you get an error?
no, no error. The script simply does not run. The script only needs to generate a link to an executable to make it work properly.
Intelligence is not making mistakes, but find out how to profit immediately.
Offline
Is your verification test the 2h frequency or the @reboot?
What does the script look like?
Why is there a script if it's basically just "ln -s whatever somewhere"?
The script is executable?
If you extend it w/ "date >> /tmp/proof", does /tmp/proof also not show up after it was supposed to execute?
Finally:
Please post the output of
find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f
(ie. "cronie is enabled, is it?")
Offline
Thanks for the reply.
In fact the problem was the "cronie" service that was disabled by default. I had not checked because I always assumed that cron was always enabled on Linux systems.
after enabling "cronie.service" the crontab works and runs the script.
Thanks again for the help.
Intelligence is not making mistakes, but find out how to profit immediately.
Offline