BookmarkSubscribeRSS Feed

How to run SAS Studio 5 program on a schedule?

Started ‎09-13-2019 by
Modified ‎09-13-2019 by
Views 7,158


How to run SAS Studio 5 program on a schedule?


As you might know, SAS Studio 5 stores its data on SAS Drive. If you want to run a program, that was written in SAS Studio 5, on a schedule, you have to follow these steps.


1. First of all, you have to write a program. In my case, I did create a very simple program that prints the first ten observations from a standard SASHELP.CARS dataset.


2. Save a program, in this example I’ve used /My Folder/My Snippets


3. Open SAS Job Execution and go to /My Folder/My Snippets. SAS Job Execution URL will be


4. Click on a “New” button and create a job definition as shown below





5. Select a newly created job definition and click “Edit”



6. Paste the following code, click “Save” and “Submit”. You can get more information about FILENAME FILESRVC on this page. The code will be executed and you will see output if you have any.

filename job filesrvc folderpath='/Users/YOUR_ID/My Folder/My Snippets' filename='';
%include job / source;


7. Go to Jobs inside SAS Job Execution, highlight a job definition and click “Schedule Job”



8. Go to Scheduling inside SAS Environment Manager Jobs, highlight a job definition and click “Edit schedule”



9. Create a new trigger. I did create a trigger which will execute a program every 5 minutes



10. Save both trigger and schedule. If you did everything correctly, you will a clock icon, which means your program has been scheduled successfully.



11. If you would like to monitor job execution, go to SAS Environment Manager -> Jobs -> Monitoring. As you can see below, my program was executed two times before I disabled a trigger.



12. If your program producing output, you can retrieve it in SAS Job Execution -> Jobs -> right-click on the desired job -> Retrieve job output



Thanks for reading this and let me know if you have any questions. Here some useful information for you: SAS® Viya® 3.4 Administration Jobs.

Version history
Last update:
‎09-13-2019 10:54 AM
Updated by:



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags