Skip to content

sanity-io/unix-cron-to-aws-cron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unix-cron-to-aws-cron

when you want to support standard unix crontab syntax running on aws eventbridge

key conversions

  • field count: converts 5-field unix format to 6-field aws format
  • adds cron() wrapper
  • converts unix (0-7) to aws (1-7) format
  • handles aws restriction where you can't specify both day fields
  • replaces unused * with ? as required by aws
  • adds configurable year field (defaults to *)

examples

  • daily at noon: 0 12 * * *cron(0 12 ? * ? *)
  • weekdays at 9:30: 30 9 * * 1-5cron(30 9 ? * 2-6 *)
  • every sunday: 0 2 * * 0cron(0 2 ? * 1 *)
  • first of month: 0 0 1 * *cron(0 0 1 * ? *)

About

No description, website, or topics provided.

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published