Filter Condition in get Job activity

Hello team, How to write the condition for getting the last 24 hrs executed Jobs details using get job activity.
image

TRY THIS

CreationTime ge (DateTime.UtcNow.AddHours(-24))

Try to mention like this

StartDate gt (datetime'{{currentDateTime}}' - 24:00:00)

This expression will filter the results to only include jobs that were started in the last 24 hours.

Cheers @Akhil_Raveendran

Hi @Akhil_Raveendran

DateTime.Now.AddHours(-24).ToString

You can try this way

image

Hello @Akhil_Raveendran

DateTime.Now.AddHours(-24)

Hope it Helps…
Thanks & Cheers!!!

1 Like

@Akhil_Raveendran

Please try this

StartTime gt Now.ToString("yyyy-MM-ddTHH:mm:ss")

cheers

same

HI @Akhil_Raveendran

you can check this

I think query is fine
It’s about the access I believe
Let’s check in that direction as well

Make sure that the user has permission to access the jobs.
Make sure that the Orchestrator server is up and running.

Cheers @Akhil_Raveendran

1 Like

@Akhil_Raveendran

  1. Add the “Get Jobs” activity to your workflow.
  2. Configure it with the Orchestrator folder and desired job state.
  3. Set the “Start Date” to Now.AddDays(-1) (24 hours ago) and the “End Date” to Now.
  4. Use the output of the “Get Jobs” activity to access job details executed within the last 24 hours.
1 Like

Without using the filter i am able to get the all the jobs details

Does this work?
"StartTime gt " + DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss.ffZ")

Same error

@Akhil_Raveendran

Try this it should work as expected

"StartTime gt " + Now.adddays(-1).ToString("yyyy-MM-ddTHH:mm:ss.fffZ")

just now tested…Hope this solves

cheers

getting same error ,not sure what is the root cause.

@Akhil_Raveendran

Can you please recheck…or delete the activity and rea dd

just used same and no issue

cheers

Thank you all for your help .

After updating the UiPath.system.activites package to latest version i am able to update the filter conditions in GUI itself .

Thank you very much

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.