Architecting, installing and maintaining your SAS environment

Scheduling recommendation

Reply
Contributor
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.

 

Thanks,

Harish

 

Super User
Posts: 6,963

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 program.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: http://www.adminschoice.com/crontab-quick-reference

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 21

Re: Scheduling recommendation

Thank you so much..I will try this solution..
Super User
Posts: 5,260

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
  • 149 views
  • 0 likes
  • 3 in conversation