Your SAS programs, embedded in web apps and elsewhere

Schedule a SAS Batch Job

Reply
N/A
Posts: 0

Schedule a SAS Batch Job

Can anyone recommend a method for scheduling either a SAS EG Project or a SAS Stored Process to run regularly (daily, weekly, monthly, etc.) so that the schedule is handled by another machine besides my Local PC?



I can only find information in the SAS EG help for scheduling a Project such that the Scheduled Tasks on my own PC prompts the job to begin.

Given that the SAS Code itself is going to execute on a remote SAS Server, I would have thought there was some way to Schedule the job on the Server itself.

Otherwise, my own PC has to be on in order for the Batch job to execute.
Occasional Contributor
Posts: 14

Re: Schedule a SAS Batch Job

Hi,

Which platform are you running the job?

I Unix you could run the sas program in the background.

$nohup sas /path/programName.sas &

The nohup command allows you to logoff from your system.
It also saved the log and the lst files in the same path.

Thanks,
RB
N/A
Posts: 0

Re: Schedule a SAS Batch Job

My own platform is Windows PC.
I'm not sure what platform the SAS Server runs on.


My own machine only has SAS Enterprise Guide, which connects to a remote SAS Server with its own admins & permissions that are a black box to me.


We used to have individual copies of Base SAS on our PCs and a server with a "Server Copy of SAS" (not sure anymore whether that differed at all from PC Base SAS.)

Scheduling our Batch SAS Jobs was trivial as we have permissions to login to our "SAS Server" and schedule in its own Windows Task Scheduler. Our group could Desktop-develop batch jobs and Queue them to run whenever we wanted.

Now, having switched to the SAS BI Platform for all its supposed benefits, I was expecting to have a Method to queue my SAS EG Tasks to run automatically without needing my Local PC to be running.

Finding none I'm wondering how the rest of the SAS BI community handles the problem. I've found some literature online about the introduction of a dedicated "scheduling machine" but that seems like overkill for the objective - A whole server to initiate SAS jobs?

Is there somewhere in the SAS BI framework intended to handle batch-scheduling responsibilities that is accessible to the end-users?
Contributor
Posts: 66

Re: Schedule a SAS Batch Job

when you schedule a job in EG on windows you will notice that it creates a vb(.vbs) file which tells the os to run the eg job. you could run this file via CSCRIPT wrapping it up in a batch file for example. You would end up with something like;
CSCRIPT

SAS Bi server comes with the LSF job scheduler (it is used by v3.1 of Web Report Studio for example). You can also use lsf to schedule the cscript batch file. It allows for very flexible scheduling and has handling for return codes etc.

If you wan't it to run on a server, the job will need to be saved either on the server or accessible to the machine where the script is stored via the credentials used by the scheduler. Generally lsf uses lsfadmin as the account.

If you don't have access to the server get an admin to set up a LSF job or better still write a routine where it will pick up the batch file if you drop it in a directory.

hth

Cameron
Ask a Question
Discussion stats
  • 3 replies
  • 598 views
  • 0 likes
  • 3 in conversation