| domain | mand.is |
| summary | This website provides instructions on setting up a cron job to run a script every Tuesday at 7am, except for the last Tuesday of the month. It achieves this by using a check in the crontab to ensure the next week is part of the same month before executing the script.
The website also demonstrates other creative uses of cron jobs:
1. Holiday-only cronjobs: Fetch US holidays for a given year from an API, store them in a file (e.g., HOLIDAYS.txt), and update the cron job to run the script every Tuesday at 7am, excluding holidays.
2. Weather-based scripts: Utilize weather APIs (like OpenWeatherMap) to run scripts based on weather conditions, such as running a script only when it's clear or cloudy, or when there are newsworthy events. For instance, you can create hourly scripts that run when the weather is clear or cloudy, fetching forecasts from an API and checking for specific conditions using jq and grep.
In summary, this website offers guidance on setting up cron jobs with smart exceptions (like monthly holidays) and illustrates how to leverage external APIs for creating dynamic, condition-based scripts based on weather or other data sources. |
| title | George Mandis • Engineering leader, writer and creative technologist • George Mandis |
| description | Traveler, software engineer, consultant, mentor, writer and other hats as needed. |
| keywords | date, script, tuesday, read, more, month, complex, good, last, curl, https, engineering, george, words, dynamic, checks, want |
| upstreams |
|
| downstreams |
|
| nslookup | A 104.21.95.128, A 172.67.144.246 |
| created | 2025-11-08 |
| updated | 2025-11-08 |
| summarized | 2025-11-13 |
|
|