Home > Software engineering >  Cron expression to schedule a job, monday to friday
Cron expression to schedule a job, monday to friday

Time:02-03

I am using "cron(0 21 * * ? *)" as a cron expression to run my glue job every day. However, I want to change it, and make my job run just monday to friday. How could I do it? May you guys help me, please?

CodePudding user response:

You need to set the day-of-week component and unset the day-of-month:

cron(0 21 ? * MON-FRI *)

See https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html

See also https://eu-west-1.console.aws.amazon.com/glue/home?region=eu-west-1#/v2/etl-configuration/triggers/add to build and inspect cron based triggers.

  • Related