learnsomemore
Dabbler
- Joined
- Aug 16, 2018
- Messages
- 11
I have a cron running in Tasks > Cron Jobs. If from the GUI, i click the job and click "run now", it runs perfectly and outputs results to terminal and the system also sends text to another syslog server. "Redirect Stdout" and "Redirect Stderr" is not checked because they both say that checking them "disables output".
The problem is, when i'm not in the GUI and the system is running on the schedule, the cron job runs on-time (verified by watching /var/log/cron), but does not produce any output, even though the first thing my script does is echo text "cron job started".
I'm not sure why the output is different when run:
Is this a bug?
As a workaround, i changed script to echo to logger. Now output goes to messages log and the configured remote syslog server. I also noticed that if I manually add the script as a cron job with crontab -e under the user, I have the same problem. Maybe it's a FreeBSD thing as I don't have this issue in Ubuntu.
System: FreeNas-11.1-U6
The problem is, when i'm not in the GUI and the system is running on the schedule, the cron job runs on-time (verified by watching /var/log/cron), but does not produce any output, even though the first thing my script does is echo text "cron job started".
I'm not sure why the output is different when run:
- automatically via GUI scheduler (no output),
- command line added crontab (no output),
- command line execute script (output),
- or via the GUI "run now" option (output) option.
Is this a bug?
As a workaround, i changed script to echo to logger. Now output goes to messages log and the configured remote syslog server. I also noticed that if I manually add the script as a cron job with crontab -e under the user, I have the same problem. Maybe it's a FreeBSD thing as I don't have this issue in Ubuntu.
System: FreeNas-11.1-U6
Last edited: