--- title: "Custom CRON Job" slug: "fmadio-os-custom-cronjob" updated: 2024-12-14T03:22:52Z published: 2024-12-14T03:22:52Z canonical: "docs.fmad.io/fmadio-os-custom-cronjob" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.fmad.io/llms.txt > Use this file to discover all available pages before exploring further. # Custom CRON Job FMADIO System uses a default cronjob that is located as below ```plaintext /etc/crontab.root ``` Direct edits to this file will be lost every reboot, as the directory is on the RAMDisk and not persistant. This can be customized and made persistent across reboots, for anything such as scheduled weekly reboots. By creating the cronjob file as bellow. ```plaintext cp /etc/crontab.root /opt/fmadio/etc/ ``` This puts the crontab.root file into persistent storage at ```plaintext /opt/fmadio/etc/ ``` Allowing custom cronjobs to run on the system. ## Scheduled Reboot One example of this is to schedule a system reboot every Sunday night. To do this please see the below example. ```plaintext fmadio@fmadio20v2-149:~$ cat /opt/fmadio/etc/crontab.root * * * * * /opt/fmadio/bin/watchdog.lua --nocal >> /mnt/store0/log/watchdog.log 59 23 * * 0 /sbin/reboot fmadio@fmadio20v2-149:~$ ``` Adding in the last line in the cronjob will schedule the reboot at midnight every Sunday. NOTE: a reboot or reloading of the crontab file is required for the above to become active To reload an updated crontab file as follows ```plaintext sudo crontab /opt/fmadio/etc/crontab.root ``` Then confirm the update by listing the current cronjobs ```plaintext sudo crontab -l ``` Example output below ```plaintext fmadio@fmadio200v4-636:~$ sudo crontab -l * * * * * /opt/fmadio/bin/watchdog.lua --nocal >> /mnt/store0/log/watchdog.log 59 23 * * 0 /sbin/reboot fmadio@fmadio200v4-636:~$ ```