Seting Waktu Cronjob Linux Ubuntu Server

Tugas kerja sistem linux dikerjakan secara terjadwal lewat setingan cronjob, crontab.

Seting cronjob linux, masuk ssh:

crontab -e

Format cronjob: ket pada gambar diatas.

Cronjob 1 menit

jalan setiap 1 menit setiap hari

* * * * * wget -O - "https://www.namadomain.com/cek_job.php" >/dev/null 2>&1

Cronjob 2 menit

jalan setiap 2 menit setiap hari

*/2 * * * * wget -O - "https://www.namadomain.com/cek_job.php" >/dev/null 2>&1

Cronjob 1 jam

jalan setiap 1 jam setiap hari

0 * * * * wget -O - "https://www.namadomain.com/cek_job.php" >/dev/null 2>&1

Seting waktu lainya:

Cron Job Command
Run Cron Job Every Minute * * * * * /root/backup.sh
Run Cron Job Every 30 Minutes 30 * * * * /root/backup.sh
Run Cron Job Every Hour 0 * * * */root/backup.sh
Run Cron Job Every Day at Midnight 0 0 * * * /root/backup.sh
Run Cron Job at 2 am Every Day 0 2 * * * /root/backup.sh
Run Cron Job Every 1st of the Month 0 0 1 * * /root/backup.sh
Run Cron Job Every 15th of the Month 0 0 15 * * /root/backup.sh
Run Cron Job on December 1st – Midnight 0 0 0 12 * /root/backup.sh
Run Cron Job on Saturday at Midnight 0 0 * * 6 /root/backup.sh
READ :  Masalah Temporary folder not found Wordpress 100% Work