3 Min. Lesezeit
Was ist Cron Job?
A cron job is a time-based task scheduler in Unix-like systems that automatically runs scripts or commands at specified intervals, such as every hour, daily, or on specific days of the week.
What is a Cron Job?
A cron job is a scheduled task that runs automatically at predefined times or intervals on Unix-like operating systems. The name comes from the Greek word "chronos" (time) and the cron daemon, a background process that reads a schedule table called a crontab and executes commands accordingly.
Cron Expression Syntax
Cron schedules are defined using a five-field expression:
```
ââââââââââââââ minute (0-59)
â ââââââââââââââ hour (0-23)
â â ââââââââââââââ day of month (1-31)
â â â ââââââââââââââ month (1-12)
â â â â ââââââââââââââ day of week (0-7, 0 and 7 = Sunday)
â â â â â
* * * * *
```
Common examples:
0 9 * * 1-5 â Every weekday at 9:00 AM*/15 * * * * â Every 15 minutes0 0 1 * * â First day of every month at midnight0 */6 * * * â Every 6 hoursCron Jobs in Automation
Cron jobs are the backbone of scheduled automation. Common uses include:
Limitations of Traditional Cron
While cron is powerful, it has significant limitations for modern automation:
Modern Alternatives
Cloud-based schedulers like AWS EventBridge, Google Cloud Scheduler, and workflow automation platforms have largely replaced raw cron for production use. These provide retry logic, monitoring, distributed execution, and visual scheduling interfaces.
Warum es wichtig ist
Cron jobs are foundational to any automated workflow that needs to run on a schedule. Understanding how scheduling works helps you design reliable, repeatable automations that collect data, generate reports, or trigger processes without manual intervention.
Wie Autonoly das löst
Autonoly provides visual workflow scheduling that goes far beyond cron syntax. Set any schedule with a simple interface, get automatic retries on failure, view full execution history, and receive alerts when jobs fail. No server management or crontab editing required.
Mehr erfahrenBeispiele
Scheduling a web scraping workflow to collect competitor prices every morning at 8 AM across five e-commerce sites.
Running a daily cron job at midnight to aggregate API data from multiple SaaS tools into a consolidated Google Sheet.
Setting up a weekly Monday 9 AM schedule to generate and email a PDF report summarizing the past week's data.
HĂ€ufig gestellte Fragen
What is the difference between a cron job and a scheduled task?
A cron job is the Unix/Linux implementation of a scheduled task. Windows uses Task Scheduler for the same purpose. The term 'scheduled task' is more general and platform-agnostic, while 'cron job' specifically refers to the cron daemon and crontab system on Unix-like operating systems.
Can cron jobs run every second?
Standard cron has a minimum granularity of one minute. To run tasks more frequently, you would need to use a different scheduling mechanism, such as a loop with sleep commands, a dedicated task queue like Celery, or a real-time event-driven system.
How do you monitor cron jobs for failures?
Common approaches include piping output to log files, using monitoring services like Cronitor or Healthchecks.io that alert when expected pings are missed, configuring email notifications via the MAILTO crontab variable, or using a workflow automation platform that provides built-in execution monitoring.
Hören Sie auf, ĂŒber Automatisierung zu lesen.
Fangen Sie an zu automatisieren.
Beschreiben Sie, was Sie brauchen, in einfachem Deutsch. Der AI-Agent von Autonoly erstellt und fĂŒhrt die Automatisierung fĂŒr Sie aus â ganz ohne Code.