Postingan

Menampilkan postingan dari Februari, 2018

Basic Crontab

Crontab is used to run a command or script that has been scheduled at a certain time. Crontab can be used to run tasks that require periodic intervals, examples of time synchronization or backups, so the admin does not have to do it manually. Every user on linux has their own crontab file. See the ongoing crontab To see the running crontab using the command # crontab -l Edit Cronjobs To edit the cronjobs list use the command # crontab -e Then it will open the editor, in Debian 9 that I use, the default editor use nano. Crontab writing format * * * * * command to be executed The meaning of its asterisks # + ---------------- minute (0 - 59) # | + -------------- hour (0 - 23) # | | + ------------ day of month (1 - 31) # | | | + ---------- month (1 - 12) # | | | | + -------- day of week (0 - 6) (Sunday = 0 or 7) # | | | | |   * * * * * command to be executed Usage examples for time synchronization with the ntpdate command Execution every minute: * * * * *