Skip to main content
Question

Jinja time check in Pipelines

  • December 13, 2023
  • 0 replies
  • 86 views

I wish to stop my pipelines running outside of working hours

I have an IF section with advanced expression. What is the correct syntax to check whether the current hour is greater than or equal to a given hour?

I have tried

{{time.now.hour <= 15'}}

{{time.now.hour <= '5}}

but these don't seem to work

thank you



------------------------------
Pete James
------------------------------
This topic has been closed for replies.

Forum|alt.badge.img+9
  • Quickbase Alumni
  • December 13, 2023

I was able to get it to work no issue - from your screenshot you seem to have a ' after the 15 and before the 5. Time.now.hour should return an integer so you should be comparing it to just an integer, remove the '

{{time.now.hour <= 15}}

Also make sure that you're accounting for UTC time in your values - so if you're using for EST working hours you'll need to add 6 to the hours you're targeting (ie 5PM EST would be 23)



------------------------------
Chayce Duncan
------------------------------

  • Author
  • Quickbase Alumni
  • December 14, 2023

thanks.. working now



------------------------------
Pete James
------------------------------