FreeNASBob
Patron
- Joined
- Aug 23, 2014
- Messages
- 226
FreeNAS-11.3-U1
I have a cron job that has been running every day at noon for years without a hitch. However, I just discovered that it stopped running April 7, which has no significance in the logs or my memory.
The cron job is a simple shell script that creates a file, and it runs fine from the shell but refuses to run from cron, even when manually run from the Web UI. There are no messages in /var/logs/messages or /var/logs/cron. It just simply doesn't do anything.
I tried deleting the cron job and creating a new one, but it didn't work either.
Then I created the following test script:
When run from the shell it works fine. When I set up a cron job to run that script it does not work and no errors appear in any logs. The cron job is set to run as the same user as I'm logged in when running from the shell.
I tried
I'm at a loss.
I have a cron job that has been running every day at noon for years without a hitch. However, I just discovered that it stopped running April 7, which has no significance in the logs or my memory.
The cron job is a simple shell script that creates a file, and it runs fine from the shell but refuses to run from cron, even when manually run from the Web UI. There are no messages in /var/logs/messages or /var/logs/cron. It just simply doesn't do anything.
I tried deleting the cron job and creating a new one, but it didn't work either.
Then I created the following test script:
Code:
#!/bin/sh echo test > testfile
When run from the shell it works fine. When I set up a cron job to run that script it does not work and no errors appear in any logs. The cron job is set to run as the same user as I'm logged in when running from the shell.
I tried
crontab -l
from the shell, but I just received crontab: no crontab for [user]
even through the cron jobs are listed in the Web UI.I'm at a loss.
Last edited: