there is a jar file I have to execute everyday at 10:00 AM. I added the below options with crontab -e but it fails to execute. I appreciate if someone could help. Thanks in advance…
Crontab -e will edit the cron for the user who is running the command, for example dietpi or root.
Better use the full path to the java command, otherwise it might fail for that.
Also the second command is supposed to run as root? Then you need to add it in root’s crontab.
Very strange… Journal said it executed in the right time… But it didn’t do anything. I tried rebooting and it suddenly started working. So everytime I add a cronjob it doesn’t take effect until I reboot but strangely before reboot, journal says the code was executed…