<?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 Scheduling a sas code in local machine windows in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Scheduling-a-sas-code-in-local-machine-windows/m-p/946136#M370558</link>
    <description>&lt;P&gt;&amp;nbsp;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can any one help me on the below issue .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a sas code locally in my machine and i want to schedule the job and it has to run the code everyday .Can any one please share some options .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;options :I have sas studio and it dont have scheduling option&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can i run the sas code using .dat file if any chance to run the sas code using .dat file then please share the options to run the sas code everyday evening 6pm&lt;/P&gt;</description>
    <pubDate>Thu, 03 Oct 2024 14:57:10 GMT</pubDate>
    <dc:creator>U2</dc:creator>
    <dc:date>2024-10-03T14:57:10Z</dc:date>
    <item>
      <title>Scheduling a sas code in local machine windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Scheduling-a-sas-code-in-local-machine-windows/m-p/946136#M370558</link>
      <description>&lt;P&gt;&amp;nbsp;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can any one help me on the below issue .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a sas code locally in my machine and i want to schedule the job and it has to run the code everyday .Can any one please share some options .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;options :I have sas studio and it dont have scheduling option&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can i run the sas code using .dat file if any chance to run the sas code using .dat file then please share the options to run the sas code everyday evening 6pm&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 14:57:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Scheduling-a-sas-code-in-local-machine-windows/m-p/946136#M370558</guid>
      <dc:creator>U2</dc:creator>
      <dc:date>2024-10-03T14:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: Scheduling a sas code in local machine windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Scheduling-a-sas-code-in-local-machine-windows/m-p/946185#M370573</link>
      <description>&lt;DIV class="message"&gt;
&lt;DIV class="content user-select-text" tabindex="0" aria-description="" aria-label="Sent by Copilot: You can schedule your SAS code to run daily using the Windows Task Scheduler. Here’s a step-by-step guide to help you set it up:

1. **Create a Batch File**:
   - Open a text editor (like Notepad) and create a `.bat` file with the following content:
     ```batch
     &amp;quot;C:\Program Files\SASHome\SASFoundation\9.4\sas.exe&amp;quot; -sysin &amp;quot;C:\path\to\your\script.sas&amp;quot; -log &amp;quot;C:\path\to\your\log.log&amp;quot; -print &amp;quot;C:\path\to\your\output.lst&amp;quot;
     ```
   - Replace the paths with the actual paths to your SAS executable, script, log file, and output file.

2. **Schedule the Batch File**:
   - Open **Task Scheduler** from the Start menu.
   - Click on **Create Basic Task**.
   - Name your task and provide a description.
   - Set the trigger to **Daily** and specify the time (6 PM in your case).
   - For the action, choose **Start a program** and browse to your `.bat` file.
   - Finish the setup and your task will be scheduled to run daily at 6 PM.

This method uses the Windows Task Scheduler to run your SAS code in batch mode, ensuring it executes at the specified time every day[^1^](https://blogs.sas.com/content/sgf/2013/08/14/four-ways-to-schedule-sas-tasks/)[^2^](https://communities.sas.com/t5/SAS-Programming/Schedule-a-base-SAS-program-to-Run-Daily/td-p/760118).

Would you like more details on any of these steps?"&gt;
&lt;DIV class="ac-container ac-adaptiveCard"&gt;
&lt;DIV class="ac-textBlock"&gt;
&lt;P&gt;You can schedule your SAS code to run daily using the Windows Task Scheduler. Here’s a step-by-step guide to help you set it up:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Create a Batch File&lt;/STRONG&gt;:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Open a text editor (like Notepad) and create a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;.bat&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;file with the following content:
&lt;DIV class="code" tabindex="-1"&gt;
&lt;PRE&gt;&lt;CODE class="language-batch"&gt;"C:\Program Files\SASHome\SASFoundation\9.4\sas.exe" -sysin "C:\path\to\your\script.sas" -log "C:\path\to\your\log.log" -print "C:\path\to\your\output.lst"
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;BUTTON type="button" aria-label="Copy"&gt;&lt;/BUTTON&gt;&lt;/LI&gt;
&lt;LI&gt;Replace the paths with the actual paths to your SAS executable, script, log file, and output file.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Schedule the Batch File&lt;/STRONG&gt;:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Open&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Task Scheduler&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;from the Start menu.&lt;/LI&gt;
&lt;LI&gt;Click on&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Create Basic Task&lt;/STRONG&gt;.&lt;/LI&gt;
&lt;LI&gt;Name your task and provide a description.&lt;/LI&gt;
&lt;LI&gt;Set the trigger to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Daily&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and specify the time (6 PM in your case).&lt;/LI&gt;
&lt;LI&gt;For the action, choose&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Start a program&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and browse to your&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;.bat&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;file.&lt;/LI&gt;
&lt;LI&gt;Finish the setup and your task will be scheduled to run daily at 6 PM.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="learn-more-root" role="group" aria-labelledby="learn-more-header"&gt;
&lt;DIV class="learn-more-control"&gt;
&lt;P class="learn-more"&gt;Learn more:&lt;/P&gt;
&lt;/DIV&gt;
&lt;DIV class="attribution-container"&gt;
&lt;DIV class="attribution-items"&gt;
&lt;P&gt;&lt;A class="attribution-item" tabindex="0" href="https://blogs.sas.com/content/sgf/2013/08/14/four-ways-to-schedule-sas-tasks/" target="_blank" rel="noopener" aria-labelledby="learn-more-header" aria-label="1: blogs.sas.com-Four ways to schedule SAS tasks - SAS Users Groups - SAS Blogs" data-citationid="71845d07-4c75-05e5-17ee-cf8f0d417872"&gt;&lt;SPAN class="text-container"&gt;blogs.sas.com&lt;/SPAN&gt;&lt;/A&gt;&lt;A class="attribution-item" tabindex="0" href="https://communities.sas.com/t5/SAS-Programming/Schedule-a-base-SAS-program-to-Run-Daily/td-p/760118" target="_blank" rel="noopener" aria-labelledby="learn-more-header" aria-label="2: communities.sas.com-Schedule a base SAS program to Run Daily - SAS Communities" data-citationid="2996da34-6c1c-8b05-4a5d-6c2e642daf6c"&gt;&lt;SPAN class="badge"&gt;2&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A class="attribution-item" style="font-family: inherit; background-color: #ffffff;" tabindex="0" href="https://communities.sas.com/t5/SAS-Programming/Schedule-a-base-SAS-program-to-Run-Daily/td-p/760118" target="_blank" rel="noopener" aria-labelledby="learn-more-header" aria-label="2: communities.sas.com-Schedule a base SAS program to Run Daily - SAS Communities" data-citationid="2996da34-6c1c-8b05-4a5d-6c2e642daf6c"&gt;&lt;SPAN class="text-container"&gt;communities.sas.com&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 03 Oct 2024 18:19:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Scheduling-a-sas-code-in-local-machine-windows/m-p/946185#M370573</guid>
      <dc:creator>JOL</dc:creator>
      <dc:date>2024-10-03T18:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Scheduling a sas code in local machine windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Scheduling-a-sas-code-in-local-machine-windows/m-p/946191#M370575</link>
      <description>So if I schedule using task scheduler should my system or laptop should on&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Oct 2024 19:22:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Scheduling-a-sas-code-in-local-machine-windows/m-p/946191#M370575</guid>
      <dc:creator>U2</dc:creator>
      <dc:date>2024-10-03T19:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Scheduling a sas code in local machine windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Scheduling-a-sas-code-in-local-machine-windows/m-p/946198#M370578</link>
      <description>&lt;P&gt;yes&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 20:53:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Scheduling-a-sas-code-in-local-machine-windows/m-p/946198#M370578</guid>
      <dc:creator>JOL</dc:creator>
      <dc:date>2024-10-03T20:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Scheduling a sas code in local machine windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Scheduling-a-sas-code-in-local-machine-windows/m-p/946226#M370587</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/296798"&gt;@U2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;So if I schedule using task scheduler should my system or laptop should on&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Of course. And the SAS system must be installed locally on that computer.&lt;/P&gt;
&lt;P&gt;If you use a remote SAS server with Enterprise Guide or SAS Studio, the code file must be stored there, and the scheduling done using the server's resources.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2024 08:03:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Scheduling-a-sas-code-in-local-machine-windows/m-p/946226#M370587</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-10-04T08:03:40Z</dc:date>
    </item>
  </channel>
</rss>

