Skip to main content

Is there any to select multiple schedule jobs (data profiling, lookup and monitoring project) and disabled at once or enabled them at once?

Hi ​@akshayl09 ,

at the moment the only way to edit schedulers in bulk is through the API. If you give me more specific description of a usecase that you would like to achieve, I can help you with the API call itself. Alternatively, you should be able to edit schedulers also through the ONE Desktop and use of ONE Metadata Reader/Writer steps.

For the API, besides our official documentation, there is a lot of resources on the community to help you start, for instance:

Kind regards,

Anna


Thanks Anna!

Use Case:

There is monthly maintenance activity on DPE, so Schedules job (data profiling, lookups and monitoring projects) needs to disable during that activity and enabled them again after activity gets completed. 

I am looking for solution where I can select all the schedule job and disabled it at once and enabled the schedules for them again. 

 


Hi ​@akshayl09 ,

 

for this specific usecase - have you considered checking the “Queue action for later” checkbox?

What it does - in case there is an outage in the platform (e.g. the DPE is unavailable), the job will wait and get triggered once the platform is back online. I understand that in some cases it is not desirable for the jobs to run outside of the scheduled time but perhaps that is not your case?

Otherwise, I would do it like this - build a workflow that will disable all schedulers. The graphql used is:

mutation SaveEntity_catalogItemSchedule(
$gid: GID!
$patch: catalogItemSchedulePatch!
) {
catalogItemScheduleUpdate(gid: $gid, patch: $patch) {
result {
success
}
}
}

(please double check the brackets)

With the following variable:

{
"gid": "36ed325c-0000-7000-0000-0000003addd4",
"patch": {
"enabled": {
"kind": "UPDATE",
"old": true,
"new": false
}
}
}

OR for enable back:

{
"gid": "36ed325c-0000-7000-0000-0000003addd4",
"patch": {
"enabled": {
"kind": "UPDATE",
"old": false,
"new": true
}
}
}

where the gid is ID of the scheduler (you can get those using e.g. Metadata Reader or graphql as well).

Let me know if this helps or if you need additional assistance.

Kind regards,

Anna


Thanks Anna! This helps a lot. 

One thing is remining I guess in this one. If you could help with snippet to get the list of Gid for schedules? 


Hi,

sure, you can use something like this:

query Get_Listing_schedule {
schedules(
versionSelector: {draftVersion: true}
) {
edges {
node {
gid
type
parentGid
parentNodePath
draftVersion {
cronExpression
enabled
ignoreMisfires
description
timeZone
startAt
endAt
priority
nextRun
partition

}
}
}
}
}

The type will tell you what type of schedule it is (e.g. DQ Eval Schedule) and parentGid, resp. parentNodePath the ID of the asset where the schedule is configure for and the path to it, e.g. 

"node": {
"gid": "36ed325c-0000-7000-0000-0000000dcd13",
"type": "observabilityPrimarySchedule",
"parentGid": "36ed325c-0000-7000-0000-0000000dcd11",
"parentNodePath": "/sources/observabilityConfiguration",
....

Let me know if this helps.

Kind regards,

Anna


Reply