BookmarkSubscribeRSS Feed
chennupriya
Quartz | Level 8

Hi I have a sas program which updates a table  in sql server everytime i run the sas code in base sas 9.4 . But that code need to be run weekly and mine is desktop sas and i need to schedule the job using windows task scheduler . Can anyone pls help

how is the process as i have  no idea about it

 

 

Thanks

5 REPLIES 5
pearsoninst
Pyrite | Level 9
  1. Open Task Scheduler by clicking the Start button, clicking Control Panel, clicking System and Security, clickingAdministrative Tools, and then double-clicking Task Scheduler. If you're prompted for an administrator password or confirmation, type the password or provide confirmation.

  2. Click the Action menu, and then click Create Basic Task.

  3. Type a name for the task and an optional description, and then click Next.

  4. Do one of the following:

    • To select a schedule based on the calendar, click Daily, Weekly, Monthly, or One time, click Next; specify the schedule you want to use, and then click Next.

    • To select a schedule based on common recurring events, click When the computer starts or When I log on, and then click Next.

    • To select a schedule based on specific events, click When a specific event is logged, click Next; specify the event log and other information using the drop-down lists, and then click Next.

  5. To schedule a program to start automatically, click Start a program, and then click Next.

  6. Click Browse to find the program you want to start, and then click Next.

  7. Click Finish.

 

If you want a task to run when the computer starts, whether a user is logged on or not, follow these steps.

  1. Open Task Scheduler by clicking the Start button  clicking Control Panel, clicking System and Security, clickingAdministrative Tools, and then double-clicking Task Scheduler.If you're prompted for an administrator password or confirmation, type the password or provide confirmation.

  2. Click the Action menu, and then click Create Basic Task.

  3. Type a name for the task and an optional description, and then click Next.

  4. Click When the computer starts, and then click Next.

  5. To schedule a program to start automatically, click Start a program, and then click Next.

  6. Click Browse to find the program you want to start, and then click Next.

  7. Select the Open the Properties dialog for this task when I click Finish check box and click Finish.

  8. In the Properties dialog box, select Run whether user is logged on or not, and then click OK.

chennupriya
Quartz | Level 8

i did the same way but i get an error which is indicated below .Pls help

 

ERROR: Unrecognized SAS option name :\Jack_cash\SAMPLECODE.LOG".
ERROR: (SASXKRIN): KERNEL RESOURCE INITIALIZATION FAILED.
ERROR: Unable to initialize the SAS kernel

LinusH
Tourmaline | Level 20

Seems you are mising the drive letter in the search path.

There might be another syntax since it expects a option name, not an option parameter.

If you run the task as System, there can be problems referring to drive letters not set up by the BIOS.

Data never sleeps
chennupriya
Quartz | Level 8

Hi

Sorry I couldnt understand what u have said . Below is the link i am using to create a bat file . Pls help me if i am wrong

 


"C:\Program Files\sashome\SASFoundation\9.4\sas.exe" -SYSIN "C:\test1.sas -LOG "C:\test1.log" -PRINT "C:\test1.lst"

LinusH
Tourmaline | Level 20
It seems you missed a double quote after .sas.
Data never sleeps

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 5 replies
  • 11961 views
  • 2 likes
  • 3 in conversation