CRON job will not run
-
- Posts: 10
- Joined: 2020/12/06 17:43:29
- Contact:
CRON job will not run
I'm having an issue where a CRON job will not run, no matter what I do.
So far, I've checked the permissions on the file, which indicate the file is executable:
And I've reviewed the script, which can be run manually with no errors:
I need some guidance. I don't know where else to look for how to resolve this.
Thanks,
--
Michael Frankel
President & CEO, Wizard Consulting Group, Inc.
So far, I've checked the permissions on the file, which indicate the file is executable:
And I've reviewed the script, which can be run manually with no errors:
I need some guidance. I don't know where else to look for how to resolve this.
Thanks,
--
Michael Frankel
President & CEO, Wizard Consulting Group, Inc.
- Attachments
-
- Screen Shot 2020-12-09 at 12.30.04.png (77.17 KiB) Viewed 787 times
-
- Screen Shot 2020-12-09 at 12.30.34.png (88.1 KiB) Viewed 787 times
-
- Posts: 1521
- Joined: 2014/05/21 20:16:00
- Location: Central New York, USA
Re: CRON job will not run
Lacking info about your crontab, and not knowing what "aws" is - may I suggest permissions for /etc/crontab cause this sort of problem.
What happens of you:
What happens of you:
Code: Select all
sudo chmod 644 /etc/crontab
sudo restorecon /etc/crontab
sudo systemctl restart crond
-
- Posts: 10
- Joined: 2020/12/06 17:43:29
- Contact:
Re: CRON job will not run
I ran the commands you suggested. Now I wait, as the CRON job should run again at 1:30 pm PST.
For reference, the permissions on /etc/crontab are -rw-r--r--
Will report back after 1:30.
For reference, the permissions on /etc/crontab are -rw-r--r--
Will report back after 1:30.
-
- Posts: 10
- Joined: 2020/12/06 17:43:29
- Contact:
Re: CRON job will not run
OK - followed your instructions - the job did NOT run.
Any other ideas??
Any other ideas??
-
- Posts: 1521
- Joined: 2014/05/21 20:16:00
- Location: Central New York, USA
Re: CRON job will not run
still lacking info:
my working crontab
my working crontab
Code: Select all
ls -la /etc/crontab
-rw-r--r--. 1 root root 1448 Nov 28 10:23 /etc/crontab
Re: CRON job will not run
I think cron jobs runs in a limited shell where it does not
have a full PATH. Try with full paths for all commands in
your script.
have a full PATH. Try with full paths for all commands in
your script.
-
- Posts: 10
- Joined: 2020/12/06 17:43:29
- Contact:
Re: CRON job will not run
That makes sense.
I'll try that and report back tomorrow.
Thanks
I'll try that and report back tomorrow.
Thanks
-
- Posts: 1521
- Joined: 2014/05/21 20:16:00
- Location: Central New York, USA
Re: CRON job will not run
That too. {forgot about that}I think cron jobs runs in a limited shell where it does not
have a full PATH. Try with full paths for all commands in
your script.
-
- Posts: 10
- Joined: 2020/12/06 17:43:29
- Contact:
Re: CRON job will not run
Well, I made sure all of the paths were full paths, including tracing the command back to its actual location (followed hard links).
Then I removed the logging functions since after checking the cloud storage provider (Wasabi) it appears the backup is working.
Thanks to everyone here for your suggestions and guidance.
--
Michael Frankel
President & CEO, Wizard Consulting Group, Inc.
Then I removed the logging functions since after checking the cloud storage provider (Wasabi) it appears the backup is working.
Thanks to everyone here for your suggestions and guidance.
--
Michael Frankel
President & CEO, Wizard Consulting Group, Inc.
Re: CRON job will not run
check :
cat /etc/cron.allow
cat /etc/cron.allow