1. What is Cron?
- Cron = scheduler for automatically running commands/scripts at a specific time.
- Crontab = file where cron jobs are defined.
2. Check Cron Service
Loading...Start:
Loading...Stop:
Loading...Restart:
Loading...3. Open Crontab
Edit your user's cron jobs:
Loading...View cron jobs:
Loading...Remove all cron jobs:
Loading...4. Cron Syntax
Loading...Format:
minute hour day-of-month month day-of-week command5. Examples
Run every minute:
Loading...Run every day at 10:30 AM:
Loading...Run every Sunday at 9 AM:
Loading...Run every 5 minutes:
Loading...Run every hour:
Loading...6. Run a Script with Cron
Make script executable:
Loading...Add to crontab:
Loading...Use absolute paths in cron jobs.
7. Redirect Output to a File
Loading...>>→ append output
2>&1→ redirect errors to the same file
8. Special Cron Shortcuts
Loading...Example:
Loading...Key Commands
Loading....jpg?table=block&id=29d76b1d-f1a8-8072-a9bf-cc78d1c7d881&cache=v2)