Last active
August 9, 2024 07:04
-
-
Save hashfii/64bdcbaf1f1518a60f1bae833716b0a7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script untuk menghapus semua cron job yang ada dan menambahkan yang baru | |
# Definisikan cron job yang akan ditambahkan | |
cron_job_1="0 0 * * * sudo reboot" | |
# Hapus semua cron job yang ada | |
crontab -r | |
# Tambahkan cron job baru | |
(echo "$cron_job_1" ; echo "$cron_job_2" ; echo "$cron_job_3") | crontab - | |
echo "Crontab telah diupdate." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment