Architecting, installing and maintaining your SAS environment

Scheduling recommendation

Posts: 21

Scheduling recommendation

Hi Team,


Need the assistance regarding the Crontab Job Sheduling, I  have the .Sas Program file (macro which create the Library for reporting)

and these need to be sheduled on dialy basis.Since, we do not have the LSF Job sheduler and this job need be be sheduled in the Crontab.please help me step by step to shedule this .sas job.





Super User
Posts: 9,932

Re: Scheduling recommendation

Step 1: Determine at which time the job should run

Step 2: switch to the user that is supposed to run the scheduled job (in any commandline window)

Step 3: enter the command crontab -e
  your current crontab setting will be read and opened with vi (the classical UNIX fullscreen editor)

Step 3: if the crontab is not empty, navigate to the last line of the file

Step 4: enter "A" to start insert mode at the end of the current line; if the line is not empty, add a new line with [return]

Step 5: enter a line in the following format:

  minutes hours day month weekday command

  the columns are separated by blank space, blank spaces in the command do not matter, as it is the last column anyway

  in every one of the first 5 columns, an asterisk can be entered to enable running in every occurence (every minute, every day, ...)

  your line would probably look like

35 4 * * * /usr/local/SAS/SASFoundation/9.4/sas

  meaning your program runs at 04:35 every day.

Step 5: press Escape, and then enter a colon immediately followed by a (non-capital!) x

  this exits insert mode, saves the temporary file, and exits vi; crontab will then save your edited cron table to /var/spool/cron/crontabs/username, and your scheduled command will be active.


An explanation and short crontab tutorial can be found here:

Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Posts: 21

Re: Scheduling recommendation

Posted in reply to KurtBremser
Thank you so much..I will try this solution..
Super User
Posts: 5,853

Re: Scheduling recommendation

If do have Integration Technologies you could perform this from the management console. It gives you the (almost the same) functionality, but with graphical process flows and the schedule will be in your Metadata.
Data never sleeps
Ask a Question
Discussion stats
  • 3 replies
  • 3 in conversation