Cron jobs not executing
Posted: Thu Apr 16, 2020 8:53 pm
I installed LuckyBackup. To test it I created a couple of directories with a few files and configured the program to bck them up to a flash drive. When I ran the backup manually it worked fine.
Then I changed some of the directory content and ran it again. My changes were reflected on the backup drive.
Then I went to the scheduler and scheduled it to run about 3 minutes later. I made a few changes to the directories and waited until after the scheduled run, and found nothing changed on the backup drive.
Tried a few variations of this with no luck.
I checked crontab using crontab -l
The job was there:
I copied the command:
pasted it in to terminal and it ran fine.
I ran the command
a few times and verified it adde entries to the file.
Then I added it as a scheduled kob using crontab -e as
and checked timefile.txt but it did not change.
So I conclude that jobs in crontab are just not being executed.
pgrep cron returms a pid number indicating the service is running.
There is no /etc/cron.allow or /etc/cron.allowdeny files.
I tried adding to both user and root crontab.
I don’t really consider myself a “newbie” but have not played around with cron much and it just seems this should not be that hard. Better part of the day spent on this. Too much of a learning experience without actually learning how to fix it….
Then I changed some of the directory content and ran it again. My changes were reflected on the backup drive.
Then I went to the scheduler and scheduled it to run about 3 minutes later. I made a few changes to the directories and waited until after the scheduled run, and found nothing changed on the backup drive.
Tried a few variations of this with no luck.
I checked crontab using crontab -l
The job was there:
Code: Select all
20 16 * * * env DISPLAY=:0 /usr/bin/luckybackup --silent --skip-critical /home/owner/.luckyBackup/profiles/default.profile > /home/owner/.luckyBackup/logs/default-LastCronLog.log 2>&1
Code: Select all
/usr/bin/luckybackup --silent --skip-critical /home/owner/.luckyBackup/profiles/default.profile > /home/owner/.luckyBackup/logs/default-LastCronLog.log 2>&1
I ran the command
Code: Select all
date +%T >>/home/owner/timefile.txt
Then I added it as a scheduled kob using crontab -e as
Code: Select all
* * * * * date +%T >>/home/owner/timefile.txt
So I conclude that jobs in crontab are just not being executed.
pgrep cron returms a pid number indicating the service is running.
There is no /etc/cron.allow or /etc/cron.allowdeny files.
I tried adding to both user and root crontab.
I don’t really consider myself a “newbie” but have not played around with cron much and it just seems this should not be that hard. Better part of the day spent on this. Too much of a learning experience without actually learning how to fix it….