Hi,
I am trying to get the list of sts jobs, scheduling mode: Batch(daily).. tried with multiple options but not able to achieve it. could you please help us on this using gcloud.
gcloud transfer jobs list --format=json | grep -E 'Batch\(daily\)'
Please help us on this.
Thanks in advance
Hi @lokesh456,
Welcome to Google Cloud Community!
Are there any errors you encounter when creating STS with scheduling options? You could follow this documentation on choosing your scheduling options when you create your transfer job. You can check the screenshot below for your reference.
Let me know if this helps.
Hi @lokesh456 ,
My understanding is that you're trying to identify only the jobs that have the Batch scheduling mode, as shown in this screenshot:
In the JSON output of the "gcloud transfer jobs list", if you see a "schedule" object for a job, then that's a batch job, as shown in this example
{
"creationTime": "2023-09-29T21:22:08.989054389Z",
"lastModificationTime": "2023-09-29T21:22:08.989054389Z",
...
...
"schedule": {
...
}
},
...
}
}
}
But if the output for a job doesn't show the "schedule" object and shows "eventStream" instead, then that's an event-driven job, as shown in this example.
{
"creationTime": "2023-09-29T22:34:34.808990083Z",
"eventStream": {
...
},
...
}
}
So you can filter the output to show only the jobs that have the "schedule" object. I hope that helps.