trigger:Cron
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| trigger:Cron [2017/09/04 06:56] – created peternlewis | trigger:Cron [2025/03/27 05:08] (current) – [Examples] peternlewis | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | The *Cron trigger* lets you execute a macro periodically while you are logged in. | + | ====== |
| - | The [[https:// | + | The *Cron* trigger (v8+) lets you execute a macro periodically while you are logged in. |
| + | |||
| + | The Cron format lets you specify when a trigger will fire based on the time of day and and day of month and week. | ||
| The times are set using 5 (or 6) space separated fields, representing the | The times are set using 5 (or 6) space separated fields, representing the | ||
| Line 12: | Line 14: | ||
| * Optional year (2000-2099) | * Optional year (2000-2099) | ||
| - | Each field can be a single number, or it can be a range (eg " | + | Each field can be a single number, or it can be a range (eg " |
| - | + | ||
| - | The trigger will match when all fields match the current time (as each minute ticks over). | + | |
| For the Day of Week and Month fields, you can use the first three letters of the English name (eg " | For the Day of Week and Month fields, you can use the first three letters of the English name (eg " | ||
| - | If the number is negative, it matches from the end of the range (eg -1 in day of the month means the last day of the month). | + | If the field starts with a minus sign (-), it matches from the end of the range (eg -1 in day of the month means the last day of the month). |
| + | |||
| + | The trigger will match when all fields match the current time (as each minute ticks over). | ||
| If you start the day of the month field with a " | If you start the day of the month field with a " | ||
| + | |||
| + | Alternatively, | ||
| + | |||
| + | * `@yearly` or `annually` — same as `0 0 1 1 *` (midnight at the start of January 1st each year). | ||
| + | * `@monthly ` — same as `0 0 1 * *` (midnight at the start of the 1st of each month). | ||
| + | * `@weekly ` — same as `0 0 * * 0` (midnight at the start of the each Sunday). | ||
| + | * `@daily ` or `@midnight` — same as `0 0 * * *` (midnight at the start of the each day). | ||
| + | * `@noon ` — same as `0 12 * * *` (noon in the middle of the each day). | ||
| + | * `@hourly ` — same as `0 * * * *` (at the start of each hour). | ||
| + | |||
| + | The [[token: | ||
| + | |||
| + | Remember that your Mac **must** be awake for any trigger to run, and that if the screen is sleeping, locked, or screen saving, then UI actions generally will not work. | ||
| + | |||
| + | ===== Examples ===== | ||
| + | |||
| + | ^ Cron Setting ^ When Macro Triggers ^ | ||
| + | | `1 0 * * *` | AT one minute past midnight each day | | ||
| + | | `45 23 * * 6` | AT 23:45 (15 minutes before midnight) near the end of each Saturday | | ||
| + | | `0 12 * * Mon` | AT noon each Monday | | ||
| + | | `0 18 * * Fri` | AT 6pm each Friday | | ||
| + | | `0 9,12,18 * * *` | AT 9am, noon, and 3pm each day | | ||
| + | | `* * * * 1-5` | AT EVERY minute on workdays | | ||
| + | | `*/15 * * * *` | AT EVERY quarter hour | | ||
| + | | `0 18-23,0-8 * * *` | AT EVERY hour outside office hours | | ||
| + | | `0 12 1 Apr *` | AT noon on April 1st | | ||
| + | | `30 8 17 Apr * 2019` | AT 8:30am on 17 April, 2019 | | ||
| + | | `0 12 15 * *` | AT noon the 15th of each month | | ||
| + | | `0 12 15 * Mon` | AT noon each Monday and the 15th of each month | | ||
| + | | `0 12 15 * +Mon` | AT noon each 15th of each month if it is a Monday | | ||
| + | | `0-59/5 * * * *` | EVERY five minutes (AT :00, :05, :10, etc) | | ||
| + | | `3-59/5 * * * *` | EVERY five minutes (AT :03, :08, :13, etc) | | ||
| + | | `30 8 1-7 * +Sat` | AT 8:30 am on the first Saturday of each of month | | ||
| ===== See Also ===== | ===== See Also ===== | ||
| + | |||
| + | === Actions === | ||
| + | |||
| + | * [[: | ||
| + | |||
| + | === Tokens === | ||
| + | |||
| + | * [[token: | ||
| + | * [[token: | ||
| + | * [[token: | ||
| + | * [[: | ||
| === Triggers === | === Triggers === | ||
| * [[Periodic|Periodic]] trigger | * [[Periodic|Periodic]] trigger | ||
| - | * [[Time]] trigger | + | * [[Time |
| + | * [[Idle]] trigger | ||
| * [[/ | * [[/ | ||
| + | |||
| + | ===== Forum ===== | ||
| + | |||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
trigger/Cron.1504508178.txt.gz · Last modified: by peternlewis
