BookmarkSubscribeRSS Feed
U2
Fluorite | Level 6 U2
Fluorite | Level 6

 Hi Team,

 

Can any one help me on the below issue .

 

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 .

 

options :I have sas studio and it dont have scheduling option 

 

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

4 REPLIES 4
JOL
SAS Employee JOL
SAS Employee

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:
      "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"
      
    • 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.

 

U2
Fluorite | Level 6 U2
Fluorite | Level 6
So if I schedule using task scheduler should my system or laptop should on
Kurt_Bremser
Super User

@U2 wrote:
So if I schedule using task scheduler should my system or laptop should on

Of course. And the SAS system must be installed locally on that computer.

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.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 383 views
  • 0 likes
  • 3 in conversation