Hi there,
I will be taking some extended leave shortly and would like to automate my programs to run while I'm not there. My investigations bring me to setting up a schedule to have them run automatically. However, I want certain programs to only run if there is new data available that needs to be imported - this will be identified by a new file appearing in a specific folder SAS has access to. Is this possible? Also, does my pc need to be turned on and SAS open for the scheduler to run, or can this be set up on the server?
ETA - I want the scheduler to check if there is new data to be imported, if yes, then run the program to append the new data to the existing dataset, then delete the raw data file (the imported file). If there is no file containing new data, then there is nothing for the scheduler to do. I hope that makes sense!
Thanks,
Dearnne
Server-based scheduling is far more reliable than PC-based, so this is what I would recommend. If you have the SAS LSF scheduler available to you then you can set up the scheduling via SAS Management Console. LSF can be scheduled on the basis of a new file event - it does the checking for you so you don't have to code for it.
If you use your PC then it must be powered on and your userid must have a current password. The Windows scheduler can be used but it doesn't handle file events and you have to set up your batch jobs manually. You can write SAS code to check for file events, but then you would have to run your batch jobs more frequently just to check if a new file had arrived or not. This is not a reliable solution as all it would take is a power outage or someone to shut down your PC down and your scheduled jobs would not run.
Server-based scheduling is far more reliable than PC-based, so this is what I would recommend. If you have the SAS LSF scheduler available to you then you can set up the scheduling via SAS Management Console. LSF can be scheduled on the basis of a new file event - it does the checking for you so you don't have to code for it.
If you use your PC then it must be powered on and your userid must have a current password. The Windows scheduler can be used but it doesn't handle file events and you have to set up your batch jobs manually. You can write SAS code to check for file events, but then you would have to run your batch jobs more frequently just to check if a new file had arrived or not. This is not a reliable solution as all it would take is a power outage or someone to shut down your PC down and your scheduled jobs would not run.
Thanks - sounds like LSF scheduler via the Management Console will do exactly what I need it to do. Unfortunately I can't set anything up using Windows Scheduler as my PC won't be turned on or logged in for a few months while I'm away.
I've checked the Management Console but can't find any reference to the scheduler. Would it be as simple as contacting my administrator to ask them to "activate' this for me?
Thanks,
That is entirely possible. If your userid does not have SAS admin rights set up in SAS metadata, then you may not even see Schedule Manager as an option - this should appear in the SMC Explorer.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: