bg_image
header

Cronjob

A cron job is a scheduled, recurring background task on Unix- or Linux-based systems. It is managed by the cron daemon, which regularly checks whether a job is due to run according to a predefined schedule.

Key features of a cron job:

  • Automation: Automates tasks like backups, updates, email dispatch, or script execution.

  • Time control: You define exactly when and how often the job should run (e.g., daily at 3:00 AM or every Monday).

  • Configuration: Jobs are scheduled using crontabs (cron tables).

Example syntax (in a crontab file):

0 3 * * * /usr/bin/php /var/www/mein-skript.php

Explanation:

  • 0 3 * * * → Runs every day at 3:00 AM

  • /usr/bin/php /var/www/my-script.php → The command to execute

Time fields overview:

* * * * *  (Minute Stunde Tag Monat Wochentag)

Benefits:

  • Saves time through automation

  • Reduces human error

  • Ideal for repetitive tasks


Created 9 Hours 22 Minutes ago
Automation Command Line Interface - CLI Cronjob

Leave a Comment Cancel Reply
* Required Field