Skip to content

Use Parent Schedule #45

Answered by jfink5
tvanderhey asked this question in Q&A
Sep 6, 2023 · 1 comments · 1 reply

You must be logged in to vote

The parent's schedule is the implied default. The job itself defaults to Everyday, but it can't be added to the schedule if the parent is not. So in effect it will only run when the parent does. The downside is if you use the View Schedule option in the guis, then you will see every day listed, because the context at that moment is just the job.

So if you want to be explicit about it, then you can do it this way.

workflow.add(
JobCommand("jf1", command="echo hello",
when=Job.When(rule_based_calendars=Folder.When.RuleBasedCalendars(included=["USE PARENT"]))),
inpath="jfi-calendars/subfolder1"
)

Replies: 1 comment 1 reply

You must be logged in to vote
1 reply
@tvanderhey

Answer selected by tvanderhey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants