CRON is a time-based job scheduler in Unix-like operating systems, including Linux and macOS. It allows users to schedule tasks (also known as “cron jobs”) to run automatically at specified times or dates.
CRON works by checking the /etc/crontab file and the /etc/cron./ files on a regular basis, and executing commands specified in those files at the specified times. The tasks can be scheduled to run at a specific time, or at regular intervals, such as every hour or every day.
Each line in a CRON file represents a separate task and has the following format:
* * * * * command
- - - - -
| | | | |
| | | | ----- Day of week (0 - 7) (Sunday=both 0 and 7)
| | | ------- Month (1 - 12)
| | --------- Day of month (1 - 31)
| ----------- Hour (0 - 23)
------------- Minute (0 - 59)
The asterisks in the format above are placeholders for the specific time values. For example, the following CRON job would run the command my_script.sh
every day at 4pm:
0 16 * * * /bin/sh /path/to/my_script.sh
CRON is an essential tool for system administrators, as it allows them to automate routine tasks, such as system backups, software updates, and database maintenance. It can also be used by individual users to automate tasks such as sending emails, generating reports, and cleaning up files.
CRON is highly flexible and configurable, making it a powerful tool for automating tasks on Unix-like systems. However, it’s important to use CRON responsibly and to thoroughly test your scripts before scheduling them to run automatically.
You can also read more articles on blog
![firmbee-com-gcsnospexfs-unsplash_excerpt - Jiří Vaněk - Jiří Vaněk Set for success - Oakywood’s back to school eco-chic sale](https://blog.jirivanek.eu/wp-content/uploads/2024/08/firmbee-com-gcsnospexfs-unsplash_excerpt-1024x288.webp)
Set for success – Oakywood’s back to school eco-chic sale
![chyba_wordpress_6_hlavni - Jiří Vaněk - Jiří Vaněk Kritická chyba po aktualizaci na WordPress 6.5.5.](https://blog.jirivanek.eu/wp-content/uploads/2024/06/chyba_wordpress_6_hlavni-1024x288.webp)
How To Fix a Critical Error After Updating To WordPress 6.5.5.
![nextcloud_navod_hlavni - Jiří Vaněk - Jiří Vaněk Instalace Nextcloud na sdílený hosting (pomocí FTP)](https://blog.jirivanek.eu/wp-content/uploads/2024/06/nextcloud_navod_hlavni-1024x288.png)
Simple Installation of Nextcloud on Shared Hosting (via FTP)
![zakaz_mailove_adresy_hlavni - Jiří Vaněk - Jiří Vaněk Jak zakázat přihlášení do WordPressu pomocí e-mailové adresy](https://blog.jirivanek.eu/wp-content/uploads/2024/06/zakaz_mailove_adresy_hlavni-1024x288.webp)
How to easily disable WordPress login with e-mail address
![automatic_updates_disable_main - Jiří Vaněk - Jiří Vaněk Zakažte automatické updaty WordPressu pomocí snippetu](https://blog.jirivanek.eu/wp-content/uploads/2023/07/automatic_updates_disable_main-1024x288.webp)
Safer Updates in new WordPress 6.6
![wp_rocket_hlavni - Jiří Vaněk - Jiří Vaněk WP Rocket - výpadky serverů zpomalují WordPress weby](https://blog.jirivanek.eu/wp-content/uploads/2024/06/wp_rocket_hlavni-1024x288.webp)
WP Rocket – Server Outages Slow Down WordPress Websites
![loader_io_hlavni - Jiří Vaněk - Jiří Vaněk Jak provést zátěžový test Vašeho WordPressu - hlavní náhledový obrázek ke článku](https://blog.jirivanek.eu/wp-content/uploads/2024/06/loader_io_hlavni-1024x288.webp)
How To Perform A Simple Load Test On Your WordPress Site
![disable_updates_main - Jiří Vaněk - Jiří Vaněk Jak ve WordPressu zakázat automatické aktualizace](https://blog.jirivanek.eu/wp-content/uploads/2023/04/disable_updates_main-1024x283.webp)