If your SAS server runs on UNIX, the easiest way is to create a crontab entry.
@Ronein wrote:
Is crontab an issue in Linux or in sas?? How can I do it? Step by step...
crontab is the Unix command you can use to schedule jobs (tasks) for the cron deamon to launch. You can read about it on Unix manuals and tutorials.
Basically you schedule the Unix command you want to run. Do you know how to run your SAS program from the Unix prompt? If your environment is setup as it has been for the last 30 or so years since SAS was first released for Unxi the syntax is just:
sas myprogram.sas
Of course there are many options you migth want to add. Like where to write the SAS log. In the example above the log will be written to myprogram.log in the current working directory.
For running via cron the two things that come to mind immediately that you will need to handle are
(1) Make sure you set the current working directory first so it can find and write files in the correct place
(2) Make sure you run your normal login scripts so the environment variables and settings you normally have (and your code probably expects) are available. The default with cron is those are not run.
Maxim 6: Google Is Your Friend.
Do a search for "crontab", which will lead you to this documentation (Maxim 1!) page: https://man7.org/linux/man-pages/man1/crontab.1.html
If you are referring to SAS Enterprise Guide projects, then these can only be scheduled on a computer where EG is installed.
The options are covered in EG documentation.
If you just want to schedule a SAS program, then my preference is to use SAS Management Console's Schedule Manager. That works OOTB by filling in a few screens, assuming it has already been configured. It is all server-based which is very reliable and robust.
There are a lot of other options for scheduling SAS programs which you can read about in the SAS doc here.
I suggest you also discuss your scheduling requirements with your SAS administrator as they may already have SAS scheduling configured and a preferred option for you to use.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.