Question

Can you please help me with, what can be used to for scheduling an oozie coordinator job to execute on first Monday of every month.

I know we have a frequency parameter that can be set as ${coord:months(1)} . But this will not allow me to schedule the jobs on a particular day of a particular week of a month. Hope I am not complicating the question here.

Any help is strongly appreciated.

Thanks, Syed

Was it helpful?

Solution

You unfortunately cannot schedule in the specific manner you are looking for. As you already note, you can run on a monthly basis - i.e. the 5th day of each month, but you are not be able to control the Day of the Week other than for the first materialization.

A possible work around this would be to run your coordinator on a weekly basis, to materialize on the Monday and then have a custom Java Action as your first step in the workflow that will throw an exception if it's not the first day of the month.

A downside of this approach is that you'll see 4 or so failures per month in the job list for the coordinator, but at least it will give you the behaviour you're looking for.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top