<?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: SAS Macro To Kick Off Every 10 Minutes in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-To-Kick-Off-Every-10-Minutes/m-p/53065#M14630</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Our outsourced UNIX server admins also removed cron from us, but gave us the 'at' command.&amp;nbsp; So we use at to re-schedule itself.&amp;nbsp; Here's an example from the 'at' command man pages:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To have a job reschedule itself,&amp;nbsp; at&amp;nbsp; can&amp;nbsp; be&amp;nbsp; invoked&amp;nbsp; from within&amp;nbsp; the&amp;nbsp; at-job.&amp;nbsp; For&amp;nbsp; example,&amp;nbsp; this "daily-processing" script named my.daily runs every day (although crontab is a more appropriate vehicle for such work).&amp;nbsp; Content of the my.daily file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # my.daily runs every day&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at now tomorrow &amp;lt; my.daily&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; daily-processing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if you have access to at,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; change second line to 'at now + 10 minute &amp;lt; ...'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; change daily-processing to 'sas -batch -noterminal .........'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These operating system facilities is usually preferred than having one SAS long session that sleeps for 10 minutes then wakes up to do some stuff and the goes back to sleep.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Aug 2011 18:25:25 GMT</pubDate>
    <dc:creator>DLing</dc:creator>
    <dc:date>2011-08-23T18:25:25Z</dc:date>
    <item>
      <title>SAS Macro To Kick Off Every 10 Minutes</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-To-Kick-Off-Every-10-Minutes/m-p/53058#M14623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a request to build a SAS Macro that fires off a SAS Program every day, in 10 minute intervals.&lt;/P&gt;&lt;P&gt;I am aware of the &amp;amp;SysDate, &amp;amp;SysDay and &amp;amp;SysTime variables and figure they will be used to calcuate the Day and Time (Not sure I need to worry about the &amp;amp;SysDate), but do not have much experience with SAS Macro's and %Do loops.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know I'll need to add 10 minutes to the &amp;amp;SysTime variable and basically hold until the system clock and the &amp;amp;SysTime+10Min = the SystemTime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm working on this now, but any insight or code would be helpfull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Job will be running on UNIX and I am coding in SAS EG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TIA, Jay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 15:06:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-To-Kick-Off-Every-10-Minutes/m-p/53058#M14623</guid>
      <dc:creator>JaySwan</dc:creator>
      <dc:date>2011-08-23T15:06:46Z</dc:date>
    </item>
    <item>
      <title>SAS Macro To Kick Off Every 10 Minutes</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-To-Kick-Off-Every-10-Minutes/m-p/53059#M14624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Would it not be wiser to use the Unix scheduler to kick off the program?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 15:09:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-To-Kick-Off-Every-10-Minutes/m-p/53059#M14624</guid>
      <dc:creator>Bill</dc:creator>
      <dc:date>2011-08-23T15:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro To Kick Off Every 10 Minutes</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-To-Kick-Off-Every-10-Minutes/m-p/53060#M14625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unix Scheduler:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unix$&amp;gt; crontab -e&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10 * * * * /path/to/sas -batch -noterminal -config path/to/sasconfig.cfg -sysin /path/to/code.sas -log /path/for/log.log -print /path/for/print.lst&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS Macro (would not recommend):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%do until(&amp;amp;exception=1);&lt;/P&gt;&lt;P&gt;&amp;nbsp; %execution_macro&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; slept=sleep(60*10); /*sleep for 10 minutes */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* sas statements to catch an exeception to stop loop */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 15:16:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-To-Kick-Off-Every-10-Minutes/m-p/53060#M14625</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2011-08-23T15:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro To Kick Off Every 10 Minutes</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-To-Kick-Off-Every-10-Minutes/m-p/53061#M14626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Cron and the UNIX Scheduler are not availiable.. Thanks I am looking at the above code(s)...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 16:58:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-To-Kick-Off-Every-10-Minutes/m-p/53061#M14626</guid>
      <dc:creator>JaySwan</dc:creator>
      <dc:date>2011-08-23T16:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro To Kick Off Every 10 Minutes</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-To-Kick-Off-Every-10-Minutes/m-p/53062#M14627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you use EG's own scheduler?&amp;nbsp; I'm not familiar with it, but an application is described in the paper at: &lt;A href="http://www2.sas.com/proceedings/sugi29/156-29.pdf"&gt;http://www2.sas.com/proceedings/sugi29/156-29.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 17:10:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-To-Kick-Off-Every-10-Minutes/m-p/53062#M14627</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-08-23T17:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro To Kick Off Every 10 Minutes</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-To-Kick-Off-Every-10-Minutes/m-p/53063#M14628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can access the EG scheduler from the File&amp;gt;Schedule Project (the document above says it is under the Tools drop-down).&amp;nbsp; I have never used it before but basically anything would be preferable to a constantly running loop to execute a subsequent step once every 10 minutes...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 17:26:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-To-Kick-Off-Every-10-Minutes/m-p/53063#M14628</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2011-08-23T17:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro To Kick Off Every 10 Minutes</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-To-Kick-Off-Every-10-Minutes/m-p/53064#M14629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know if this works in Unix but in Windows you can 'pause' sas so 'pausing' for 10 minutes seems easier than trying to figure out the next run by looking at system time.&lt;/P&gt;&lt;P&gt;Definitely a brute force methodology.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 17:58:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-To-Kick-Off-Every-10-Minutes/m-p/53064#M14629</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2011-08-23T17:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro To Kick Off Every 10 Minutes</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-To-Kick-Off-Every-10-Minutes/m-p/53065#M14630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Our outsourced UNIX server admins also removed cron from us, but gave us the 'at' command.&amp;nbsp; So we use at to re-schedule itself.&amp;nbsp; Here's an example from the 'at' command man pages:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To have a job reschedule itself,&amp;nbsp; at&amp;nbsp; can&amp;nbsp; be&amp;nbsp; invoked&amp;nbsp; from within&amp;nbsp; the&amp;nbsp; at-job.&amp;nbsp; For&amp;nbsp; example,&amp;nbsp; this "daily-processing" script named my.daily runs every day (although crontab is a more appropriate vehicle for such work).&amp;nbsp; Content of the my.daily file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # my.daily runs every day&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at now tomorrow &amp;lt; my.daily&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; daily-processing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if you have access to at,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; change second line to 'at now + 10 minute &amp;lt; ...'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; change daily-processing to 'sas -batch -noterminal .........'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These operating system facilities is usually preferred than having one SAS long session that sleeps for 10 minutes then wakes up to do some stuff and the goes back to sleep.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 18:25:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-To-Kick-Off-Every-10-Minutes/m-p/53065#M14630</guid>
      <dc:creator>DLing</dc:creator>
      <dc:date>2011-08-23T18:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro To Kick Off Every 10 Minutes</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-To-Kick-Off-Every-10-Minutes/m-p/53066#M14631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure whether it could work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%do %until(count gt 100);* execute&amp;nbsp; code for one hundred;&lt;/P&gt;&lt;P&gt;.......................&lt;/P&gt;&lt;P&gt;count+1;&lt;/P&gt;&lt;P&gt;%include 'c:\report.sas';&lt;/P&gt;&lt;P&gt;call sleep(60,10); /*sleep for 10 minutes */&lt;/P&gt;&lt;P&gt;............&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2011 04:07:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-To-Kick-Off-Every-10-Minutes/m-p/53066#M14631</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-08-24T04:07:46Z</dc:date>
    </item>
  </channel>
</rss>

