actions-hourly
v1.1.2
Published
Schedules cron each 45, 48, or 50 minutes when you need it.
Downloads
31
Readme
Actions Hourly
Schedules cron each 45, 48, or 50 minutes when you need it.
- Run GitHub actions at least once per hour.
- Don't use rate limits when not needed.
- Don't run during busy peak hours.
This package is a niche solution to these issues.
npx actions-hourly <PERIOD> <WAKE> <SLEEP>- The
PERIODis 45, 48, or 50. - The
WAKEis the start time (withAMorPM) - The
SLEEPis the end time (withAMorPM)
This uses the TZ variable, which defaults to local time.
Examples
Once each 45 min from 9AM - 5PM in US Eastern.
export TZ="America/New_York"
npx actions-hourly 45 9AM 5PMExample output with random offset 3 minutes.
{
"crons_yaml": "- cron: 3 14-20/3 * * *\n- cron: 48 14-20/3 * * *\n- cron: 33 15-21/3 * * *\n- cron: 18 16-19/3 * * *",
"crons_list": [
"3 14-20/3 * * *",
"48 14-20/3 * * *",
"33 15-21/3 * * *",
"18 16-19/3 * * *"
],
"header": "Every 45 minutes, after 3 minute offset",
"local": "9AM < (America/New_York) < 5PM",
"utc": "14:03 ≤ (UTC) ≤ 21:33"
}Once each 50 min from 9AM - 5PM in India Standard Time
export TZ="Asia/Calcutta"
npx actions-hourly 50 9AM 5PMExample output with random offset 7 minutes.
{
"crons_yaml": "- cron: 27 3-8/5 * * *\n- cron: 17 4-9/5 * * *\n- cron: 7 5-10/5 * * *\n- cron: 57 5-10/5 * * *\n- cron: 47 6 * * *",
"crons_list": [
"27 3-8/5 * * *",
"17 4-9/5 * * *",
"7 5-10/5 * * *",
"57 5-10/5 * * *",
"47 6 * * *"
],
"header": "Every 50 minutes, after 7 minute offset",
"local": "9AM < (Asia/Calcutta) < 5PM",
"utc": "03:27 ≤ (UTC) ≤ 10:57"
}