awslabs / ssosync

Populate AWS SSO directly with your G Suite users and groups using either a CLI or AWS Lambda
Apache License 2.0
525 stars 181 forks source link

Is there way to overwrite ScheduleExpression in template.yml? #123

Closed cdtiwari-ebi closed 1 year ago

cdtiwari-ebi commented 1 year ago

Is your feature request related to a problem? Please describe. We are using ScheduleExpression as default 30min,60min etc but I am just curious to know if there is a way to provide GMT and office hours data so the lambda function invokes accordingly

Describe the solution you'd like like wise 15min, we can provide in format of cron expression "0 9-16 ? MON-FRI "

ChrisPates commented 1 year ago

Apologies for the huge delay in replying.

Yes, there is these are standard features of the AWS CloudWatch schedule expression.

Rate expression examples

rate(Value Unit)

Every 5 minutes | rate(5 minutes) Every hour | rate(1 hour) Every seven days | rate(7 days)

Cron expression examples

cron(Minutes Hours Day-of-month Month Day-of-week Year)

10:15 AM (UTC+0) every day | cron(15 10 * * ? *) 6:00 PM (UTC+0) Monday through Friday | cron(0 18 ? * MON-FRI *) 8:00 AM (UTC+0) on the first day of the month | cron(0 8 1 * ? *) Every 10 min on weekdays | cron(0/10 * ? * MON-FRI *) Every 5 minutes between 8:00 AM (UTC+0) and 5:55 PM (UTC+0) weekdays | cron(0/5 8-17 ? * MON-FRI *) 9:00 AM (UTC+0) on the first Monday of each month | cron(0 9 ? * 2#1 *)