<?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 Trying to delay SAS Schedule in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-delay-SAS-Schedule/m-p/673535#M36595</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently there is a schedule that automatically runs SAS programs at 12:00 am every morning. I've included the following code to delay it until 3 pm but it has not worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;data _null_;&lt;BR /&gt;start=DHMS(DATE(), 15, 00, 00);&lt;BR /&gt;wait_sec=start-datetime();&lt;BR /&gt;zzz=sleep(wait_sec,1);&lt;BR /&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Is there something wrong with the code above?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks!&lt;/DIV&gt;</description>
    <pubDate>Thu, 30 Jul 2020 19:06:09 GMT</pubDate>
    <dc:creator>mmagnuson</dc:creator>
    <dc:date>2020-07-30T19:06:09Z</dc:date>
    <item>
      <title>Trying to delay SAS Schedule</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-delay-SAS-Schedule/m-p/673535#M36595</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently there is a schedule that automatically runs SAS programs at 12:00 am every morning. I've included the following code to delay it until 3 pm but it has not worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;data _null_;&lt;BR /&gt;start=DHMS(DATE(), 15, 00, 00);&lt;BR /&gt;wait_sec=start-datetime();&lt;BR /&gt;zzz=sleep(wait_sec,1);&lt;BR /&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Is there something wrong with the code above?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks!&lt;/DIV&gt;</description>
      <pubDate>Thu, 30 Jul 2020 19:06:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-delay-SAS-Schedule/m-p/673535#M36595</guid>
      <dc:creator>mmagnuson</dc:creator>
      <dc:date>2020-07-30T19:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to delay SAS Schedule</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-delay-SAS-Schedule/m-p/673567#M36596</link>
      <description>&lt;P&gt;I don't see anything wrong with the logic, but how it works in practice might be different. What does 'has not worked' mean? It would be better to create a new 3pm schedule.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 20:36:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-delay-SAS-Schedule/m-p/673567#M36596</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-07-30T20:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to delay SAS Schedule</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-delay-SAS-Schedule/m-p/673583#M36597</link>
      <description>&lt;P&gt;If you submit it after 3PM (as I just did!) your interval will be negative. Here's a fix to move it to the NEXT 3PM.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
	starttime=hms(23, 00, 00);
	if time() &amp;lt; starttime start=DHMS(DATE(), 0, 0, starttime);
	else start=DHMS(DATE()+1, 0, 0, starttime);
	wait_sec=start-datetime();
	zzz=sleep(wait_sec,1);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Jul 2020 22:22:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-delay-SAS-Schedule/m-p/673583#M36597</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2020-07-30T22:22:56Z</dc:date>
    </item>
  </channel>
</rss>

