<?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: Batch multiple codes Task Scheduler in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Batch-multiple-codes-Task-Scheduler/m-p/566515#M159227</link>
    <description>&lt;P&gt;Always hard to understand when it doesn't work sometimes. Try find additional logs that might shed some more light over the issue.&lt;/P&gt;
&lt;P&gt;Things to look out for:&lt;/P&gt;
&lt;P&gt;- the account used by Windows Task != yours&lt;/P&gt;
&lt;P&gt;- if using system account, usually it's hard to access UNC (file shares) locations&lt;/P&gt;</description>
    <pubDate>Mon, 17 Jun 2019 09:17:57 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2019-06-17T09:17:57Z</dc:date>
    <item>
      <title>Batch multiple codes Task Scheduler</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Batch-multiple-codes-Task-Scheduler/m-p/566504#M159222</link>
      <description>&lt;P&gt;Dear SAS community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope you could help me in the following:&lt;/P&gt;&lt;P&gt;I have created a batch .cmd file, where I execute multiple SAS codes. This batch perfectly works if I do simply double click on it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I tried to run the batch via the Task Scheduler. And sometimes it works, and sometimes I get an error "sas.exe has stopped working". This error happens only for the second part of the .cmd, meaning that the first part, which includes one SAS code executes just fine, but the second SAS execution crashes. And this is happens from time to time, while testing I observed crashes in 70-80% of executions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my .cmd file:&lt;/P&gt;&lt;P&gt;set file_path=XXX&lt;BR /&gt;set file_path_log =XXX_log&lt;/P&gt;&lt;P&gt;set file_path_lst=XXX_lst&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"\\vm19003\c$\program files\SASHome\SASFoundation\9.4\sas.exe" -sysin "%file_path%.sas" -LOG "%file_path_log%" -PRINT "%file_path_lst%" -NOSPLASH -NOLOGO -ICON&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIMEOUT /T 10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;::----------------------------------------------------------------------&lt;BR /&gt;set file_path=YYY&lt;BR /&gt;set file_path_log =YYY_log&lt;/P&gt;&lt;P&gt;set file_path_lst=YYY_lst&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"\\vm19003\c$\program files\SASHome\SASFoundation\9.4\sas.exe" -sysin "%file_path%" -LOG "%file_path_log%" -PRINT "%file_path_lst%" -NOSPLASH -NOLOGO -ICON&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;exit /b&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here is the Task Scheduler action:&lt;/P&gt;&lt;P&gt;cmd.exe/c "Path_to_cmd_file"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking forward for your recommendations!&lt;/P&gt;&lt;P&gt;Sergey&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 07:27:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Batch-multiple-codes-Task-Scheduler/m-p/566504#M159222</guid>
      <dc:creator>sburnos</dc:creator>
      <dc:date>2019-06-17T07:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Batch multiple codes Task Scheduler</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Batch-multiple-codes-Task-Scheduler/m-p/566515#M159227</link>
      <description>&lt;P&gt;Always hard to understand when it doesn't work sometimes. Try find additional logs that might shed some more light over the issue.&lt;/P&gt;
&lt;P&gt;Things to look out for:&lt;/P&gt;
&lt;P&gt;- the account used by Windows Task != yours&lt;/P&gt;
&lt;P&gt;- if using system account, usually it's hard to access UNC (file shares) locations&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 09:17:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Batch-multiple-codes-Task-Scheduler/m-p/566515#M159227</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2019-06-17T09:17:57Z</dc:date>
    </item>
  </channel>
</rss>

