Architecting, installing and maintaining your SAS environment

Schedule a SAS task in Window7 task scheduler

Reply
Occasional Contributor
Posts: 15

Schedule a SAS task in Window7 task scheduler

Hi,

 

I am using Base Sas 9.2  and trying to schedule a sas code through Window scheduler. The batch  file content are as below

 

C:\Program Files\SAS\SASFoundation\9.2\sas.exe" -CONFIG "C:\Program Files\SAS\SASFoundation\9.2\nls\en\SASV9.CFG" -SYSIN "C:\***\**\Desktop\Manny\test.sas"
-LOG "C:\***\**\Desktop\Manny\test.log

 

When I double click the bat file it executes without any error and save the output as per the code "test.sas", but when i try to schedule it through Windows Scheduler irespective of the fact that it shows successfull  the output and log file didn't get created .

 

Have refered the earlier blog but no help yet .

Super User
Posts: 5,435

Re: Schedule a SAS task in Window7 task scheduler

Moving to a more suitable forum so it hits the right audience.

Data never sleeps
Super User
Posts: 5,435

Re: Schedule a SAS task in Window7 task scheduler

Be sure that you have assigned the proper user to execute the task, I think it defaults to "System", which may not always work.

When looking in WTS, what does the status/log say there?

Data never sleeps
Occasional Contributor
Posts: 15

Re: Schedule a SAS task in Window7 task scheduler

Hi Linush,

In task scheduler screen  hostory tab it is showing succsessfull , Not sure how to check Log. If it is about SAS log file it didn't generated.

is there a way wher we can check WTS log?

Trusted Advisor
Posts: 1,326

Re: Schedule a SAS task in Window7 task scheduler

Hi,

 

try to schedule the task meking sure that:

- the user that will run the program is your user (the one you used for running it from command line, because it has to run with enough rights)

- If you are admin, ensure the tick Run with Admin Priviledges is enabled

- and enable to run the program "whether the user is logged in or not".

Occasional Contributor
Posts: 15

Re: Schedule a SAS task in Window7 task scheduler

Posted in reply to JuanS_OCS

Hi Juan,

 

I am trying to run the command using same id which i have used in command lines.

 

My ID has administrative rights , but not able to check the option  "ensure the tick Run with Admin Priviledges is enabled"

wheras i have an option called Run with highest privileges

Trusted Advisor
Posts: 1,326

Re: Schedule a SAS task in Window7 task scheduler

My apologies, I meant "Run with highest privileges". Did you already tried to run with this option?

 

 

Occasional Contributor
Posts: 15

Re: Schedule a SAS task in Window7 task scheduler

All,

 

The issue got resolved , there are some setting that i need to update in task scheduler action windows and the task got executed succsefully .

 

Thanks for all the replies ,Smiley Very Happy

 

Regards,

Manny

 

Super User
Posts: 5,435

Re: Schedule a SAS task in Window7 task scheduler

Feel free to share which settings, so others can learn!
Data never sleeps
Ask a Question
Discussion stats
  • 8 replies
  • 506 views
  • 1 like
  • 3 in conversation