<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Seeking to run recipe outside of business hours only in Workato Pros Discussion Board</title>
    <link>https://systematic.workato.com/t5/workato-pros-discussion-board/seeking-to-run-recipe-outside-of-business-hours-only/m-p/4905#M2176</link>
    <description>&lt;P&gt;Hi Jay,&lt;/P&gt;&lt;P&gt;Good to know that it helped you out and even better that you were able to reduce the overall task / job count! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Aug 2023 19:12:54 GMT</pubDate>
    <dc:creator>steven-marissen</dc:creator>
    <dc:date>2023-08-10T19:12:54Z</dc:date>
    <item>
      <title>Seeking to run recipe outside of business hours only</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/seeking-to-run-recipe-outside-of-business-hours-only/m-p/4887#M2135</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would appreciate help on how to run a recipe Sat, Sun, and before 8:30am M-F and after 5:30pm M-Th and after 5:00pm F.&amp;nbsp; &amp;nbsp;I've tried to set trigger conditions based (below) but I'm having trouble handling the 1/2 hours (8:30, 5:30 times) and identifying the M-Th and F schedule from the entire week. Below is what limited progress I've made. I couldn't figure out any other way, I couldn't make the Schedular work nor with cron.&amp;nbsp;&lt;/P&gt;&lt;P&gt;(CreatedDate.to_time.in_time_zone("America/New_York").wday == 0 ) ||&lt;BR /&gt;(CreatedDate.to_time.in_time_zone("America/New_York").wday == 6 ) ||&lt;BR /&gt;(CreatedDate.to_time.in_time_zone("America/New_York").strftime("%H").to_i &amp;lt; 8 ) ||&lt;BR /&gt;(CreatedDate.to_time.in_time_zone("America/New_York").strftime("%H").to_i &amp;gt; 17 )&lt;/P&gt;&lt;P&gt;Thank you in advance for sharing your time and knowledge.&lt;/P&gt;&lt;P&gt;J&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 17:04:41 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/seeking-to-run-recipe-outside-of-business-hours-only/m-p/4887#M2135</guid>
      <dc:creator>JayMappus</dc:creator>
      <dc:date>2023-08-09T17:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: Seeking to run recipe outside of business hours only</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/seeking-to-run-recipe-outside-of-business-hours-only/m-p/4892#M2136</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I think indeed CRON is not possible as you have to exclude too specific moments.&lt;BR /&gt;The next best thing I could come up with, would be the following (trigger every x):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stevenmarissen_0-1691611184249.png" style="width: 434px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/556i02DFD2ABADEE4EBE/image-dimensions/434x628/is-moderation-mode/true?v=v2" width="434" height="628" role="button" title="stevenmarissen_0-1691611184249.png" alt="stevenmarissen_0-1691611184249.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In task 2, I created the variables as following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Day (string): now.strftime("%A")&lt;BR /&gt;&lt;UL&gt;&lt;LI&gt;This gets the day name (day of week number also possible of course)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;Special hour&lt;/EM&gt; (boolean): if now.in_time_zone("Europe/Brussels").strftime("%k").to_i &amp;gt; 17 or now.in_time_zone("Europe/Brussels").strftime("%k").to_i &amp;lt; 8 then false else true end&lt;UL&gt;&lt;LI&gt;This will return false if the hour is between 8 en 17 else true&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;In task 3, the variable is created&amp;nbsp; as following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;Special day&lt;/EM&gt; (boolean): ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'].include?(&lt;STRONG&gt;DayVariableTask2&lt;/STRONG&gt;)&lt;UL&gt;&lt;LI&gt;If the dayname is in the list, return true else false&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;If &lt;EM&gt;special day&lt;/EM&gt; and &lt;EM&gt;special hour&lt;/EM&gt; is true then do nothing, else do what is needed.&lt;/P&gt;&lt;P&gt;I know I skipped the half hours but from the above mentioned logic you can deduct that, it would work similarly&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 20:17:02 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/seeking-to-run-recipe-outside-of-business-hours-only/m-p/4892#M2136</guid>
      <dc:creator>steven-marissen</dc:creator>
      <dc:date>2023-08-09T20:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: Seeking to run recipe outside of business hours only</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/seeking-to-run-recipe-outside-of-business-hours-only/m-p/4905#M2176</link>
      <description>&lt;P&gt;Hi Jay,&lt;/P&gt;&lt;P&gt;Good to know that it helped you out and even better that you were able to reduce the overall task / job count! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 19:12:54 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/seeking-to-run-recipe-outside-of-business-hours-only/m-p/4905#M2176</guid>
      <dc:creator>steven-marissen</dc:creator>
      <dc:date>2023-08-10T19:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: Seeking to run recipe outside of business hours only</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/seeking-to-run-recipe-outside-of-business-hours-only/m-p/4907#M2177</link>
      <description>&lt;P&gt;Steven,&lt;/P&gt;&lt;P&gt;Your suggestions were excellent. You will see them sprinkled throughout the solution I came up with using your insights. I used a two-step filter approach to optimize use of the trigger to reduce cost. In the trigger condition I limited it to pulling down activities in the CRM (Insightly) that only occurred Sun, Sat and before 8am and after 5pm M, T, W, Th, Fri. Then at the next action I branched off 5pm - 5:30pm M, T, W, Th to stop and do nothing.&amp;nbsp; While I found your "Created Variable" beneficial to understand your approach, I did not use them to avoid task cost.&amp;nbsp; Thank you.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2023-08-10 at 3.28.14 PM.png" style="width: 696px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/562iE248116004B0893D/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2023-08-10 at 3.28.14 PM.png" alt="Screen Shot 2023-08-10 at 3.28.14 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 19:29:41 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/seeking-to-run-recipe-outside-of-business-hours-only/m-p/4907#M2177</guid>
      <dc:creator>JayMappus</dc:creator>
      <dc:date>2023-08-10T19:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Seeking to run recipe outside of business hours only</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/seeking-to-run-recipe-outside-of-business-hours-only/m-p/4914#M2181</link>
      <description>&lt;P&gt;So here's how I solved the "before 8:30am Eastern time". I'm checking to see if the time the project is created is before 8:30am Eastern time on the same day. I'll bet there are more elegant solutions and would welcome anyone posting them.&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;(ProjectCreatedDate&lt;/SPAN&gt;&lt;SPAN class=""&gt;Pill)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;.to_time.in_time_zone("America/New_York") &amp;lt;&lt;SPAN&gt;&amp;nbsp;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;ProjectCreatedDate&lt;/SPAN&gt;&lt;SPAN class=""&gt;Pill)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;.to_time.in_time_zone("America/New_York").strftime("%Y-%m-%dT8:30:0%:z").to_time ).in_time_zone("America/New_York")&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 13:52:25 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/seeking-to-run-recipe-outside-of-business-hours-only/m-p/4914#M2181</guid>
      <dc:creator>JayMappus</dc:creator>
      <dc:date>2023-08-11T13:52:25Z</dc:date>
    </item>
  </channel>
</rss>

