BookmarkSubscribeRSS Feed
Calcite | Level 5

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

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:

Calcite | Level 5
Thank you so much..I will try this solution..
Tourmaline | Level 20
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

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 3 in conversation