UP | HOME

NOTE: crontab

In MacOS, we have crontab and periodic can pick, but I didn't find how to set a certain time like 3 pm to run the periodic. Thus, I switch to crontab and it's very easy to use, you can type the command:

crontab -e

Or you like to run commands as root:

sudo crontab -e

Then modify in the editor(usually is vim) like the following format:

#+beginsrc crontab

1. * * * * racket fetch.rkt >/tmp/stdout.log 2>/tmp/stderr.log

#+endsrc

1.1. Online Tool: crontab.guru

Each line like the above code is a command, * * * * * points out when to run it. It is hard to remember the semantic of the format * * * * *, but thanks god we have https://crontab.guru/.

Finally, you can change log file to anywhere you like, that's all you need to know. Have a nice day.

Date: 2022-07-19 Tue 00:00

Author: Lîm Tsú-thuàn