BookmarkSubscribeRSS Feed

Set it and Forget it: Scheduling and Deploying Jobs in SAS Studio

Started ‎01-29-2026 by
Modified ‎01-29-2026 by
Views 474

One of the most common uses of SAS Viya jobs is to create a user interface to allow end users without programming experience to run programs, generate reports, and manipulate data. However, another common use is to automate and schedule recurring tasks, such as data import or export or other ETL processes. In this article, I’ll discuss how to schedule jobs in SAS Studio to minimize your manual workload.

 

 

Job Requests

 

If you’ve worked with jobs that include HTML or JSON forms, then you’re probably familiar with job definitions. A job definition contains information about a job, including the code that the job uses and any job parameters associated with it. On the other hand, a job request includes the actual run-time information necessary to execute a job, including parameter values and the compute context. Once a job is scheduled or executed, a job-request instance is created with a unique ID that can be used to identify it.

 

 

Job Options

 

Let’s take a look at an example. I have a simple program called import.sas that imports a .csv file:

 

proc import datafile="/home/student/orion_profit.csv"
    out=work.orion_profit
    dbms=csv
    replace;
    guessingrows=max;
run;

 

When you right-click on a program in SAS Studio, there are a number of job-related options:

 

  • Create a job definition saves the program as a job definition, to which you can add prompts, run via a URL, and examine in SAS Studio. The job definition is accessible using the SAS Content folder system.
  • Deploy as a job creates a job request, which is visible on the Jobs and Flows page in SAS Environment Manager. From this page, you can schedule or execute the job, but you are not able to examine the code or modify it as you can with a job definition. The job request is not visible in the SAS Content folder system.
  • Schedule as a job also creates a job request, visible in SAS Environment Manager. However, it also enables you to create a time-based trigger and schedule the execution of the job.

 

 

Scheduling a Job

 

If you select the Schedule as a job option, the scheduling window appears.

 

01_treiman_schedule_2.png

Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.

 

 

You can use this window to create a trigger, which defines when and how often you want the job to execute. You can specify a frequency and interval, such as every day, every month, or every week. You can also specify when you want the schedule to start, and when or if you want it to end.

 

Once a job is scheduled, you can view it by clicking View and Submissions and job status.

 

02_treiman_schedule_3.png

 

Then, in the Scheduled Jobs tab, you can see information about the scheduled job, as well as edit the schedule.

 

03_treiman_schedule_4-1024x403.png

 

Once the job executes, you’ll be able to monitor its status in the Monitoring Jobs tab. Here, you can see if the submission was successful, as well as information about the run time. Clicking on the job opens the log.

 

04_treiman_schedule_5-1024x215.png

 

 

Deploying Jobs

 

Deploying jobs is very similar to scheduling jobs. The difference is that scheduling a job actually executes the job, whereas deploying a job simply creates a job request that is ready to be scheduled or executed on an ad hoc basis.

 

 

Redeploying Jobs

 

One thing to be aware of is that once a job is deployed or scheduled, it is no longer connected to the original program. If you make an update to the code, the job will not automatically reflect that. Let’s look at an example.

 

Imagine I make the following change to the simple import.sas program to put the imported table into the ORSTAR library rather than the WORK library:

 

proc import datafile="/home/student/orion_profit.csv"
    out=orstar.orion_profit
    dbms=csv
    replace;
    guessingrows=max;
run;

 

When the job executes again, those changes won’t be reflected unless I redeploy the job. The Redeploy job option from the right-click menu updates the job based on the changes to the code.

 

05_treiman_schedule_6.png

 

 

Conclusion

 

Scheduling jobs in SAS Viya is an effective way to turn one-off programs into reliable, repeatable processes that run with little to no manual intervention. By understanding the differences between job definitions and job requests and knowing when to deploy, schedule, or redeploy a job, you can confidently automate ETL tasks, data imports, and other recurring workloads. With the scheduling tools available in SAS Studio and SAS Environment Manager, SAS Viya makes it easy to keep critical processes running on time while freeing you up to focus on more valuable work.

 

 

Tips and Tricks

 

  • A scheduled job must be able to run with no user input. If you schedule a job that requires a prompt selection to run and does not have a default parameter value, it will not execute successfully.
  • SAS programs, flows, and job definitions can all be scheduled.
  • Multiple jobs can be chained together to create job flows. See here for more information.

 

 

Find more articles from SAS Global Enablement and Learning here.

Contributors
Version history
Last update:
‎01-29-2026 10:25 AM
Updated by:

Catch up on SAS Innovate 2026

Dive into keynotes, announcements and breakthroughs on demand.

Explore Now →

SAS AI and Machine Learning Courses

The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.

Get started

Article Tags