Skip to content

Commit ca002d9

Browse files
author
Paul Philion
committed
updating cron docs
1 parent c86498d commit ca002d9

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

docs/threader.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ Once the `.env` file has been created, the `cron` settings can be configured.
3434

3535
To create a new entry for the threader job, use `crontab`:
3636
```
37-
sudo crontab -e
37+
crontab -e
3838
```
3939

4040
and add the following entry to the bottom, to run the threader_job.sh every 5 minutes, and direct the output to system logging with the tag `threader`:
4141
```
42-
*/5 * * * * /home/scn/netbot/threader_job.sh | /usr/bin/logger -t threader
42+
*/5 * * * * /home/scn/netbot/threader_job.sh 2>&1 | /usr/bin/logger -t threader
4343
```
4444

4545
Replace `/home/scn/netbot` above with the actual full path to the `threader_job.sh` script on the system.
@@ -79,4 +79,11 @@ To watch the threader logs as they are happening (the above log segment occurs e
7979

8080
`tail -f /var/log/syslog | grep threader`
8181

82-
will display the latest logs to the console as they occur, and is a convient way to check if the cron is operating at expected. This is where any access or authtentication errors would be displayed.
82+
will display the latest logs to the console as they occur, and is a convient way to check if the cron is operating at expected. This is where any access or authtentication errors would be displayed.
83+
84+
If logs are not showing up in syslog as expected, check the user's mail spool. In this example, the user is `scn`:
85+
```
86+
more /var/spool/mail/scn
87+
```
88+
89+
When cron has a critical failure it will attempt to send email, which can be reviewed with the above command.

0 commit comments

Comments
 (0)