BookmarkSubscribeRSS Feed
U2
Calcite | Level 5 U2
Calcite | Level 5

 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
Calcite | Level 5 U2
Calcite | Level 5
So if I schedule using task scheduler should my system or laptop should on
JOL
SAS Employee JOL
SAS Employee

yes

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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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