Bash Shell Scripting & Automated Cron Administration
Write Bash scripts featuring variables, conditional if statements, loops, arguments, and schedule recurring tasks using crontab.
Bash Automation & Cron Syntax
### Cron Schedule Expression Syntax
Cron expressions consist of 5 space-separated time fields:
```
* * * * * command_to_execute
│ │ │ │ │
│ │ │ │ └─── Day of Week (0 - 6) (Sunday = 0)
│ │ │ └────── Month (1 - 12)
│ │ └──────── Day of Month (1 - 31)
│ └────────── Hour (0 - 23)
└──────────── Minute (0 - 59)
```
Example: `0 2 * * *` executes daily at 2:00 AM.