Help using Base SAS procedures

Schedule SAS JOB USING Windows Task scheduler

Reply
Frequent Contributor
Posts: 125

Schedule SAS JOB USING Windows Task scheduler

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

Frequent Contributor
Posts: 108

Re: Schedule SAS JOB USING Windows Task scheduler

Posted in reply to chennupriya
  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.

Frequent Contributor
Posts: 125

Re: Schedule SAS JOB USING Windows Task scheduler

Posted in reply to pearsoninst

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

Super User
Posts: 5,429

Re: Schedule SAS JOB USING Windows Task scheduler

Posted in reply to chennupriya

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
Frequent Contributor
Posts: 125

Re: Schedule SAS JOB USING Windows Task scheduler

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"

Super User
Posts: 5,429

Re: Schedule SAS JOB USING Windows Task scheduler

Posted in reply to chennupriya
It seems you missed a double quote after .sas.
Data never sleeps
Ask a Question
Discussion stats
  • 5 replies
  • 479 views
  • 1 like
  • 3 in conversation