Include Page | ||||
---|---|---|---|---|
|
How to Create/Delete a Scheduled Job in SAS Viya
The following procedure outlines steps to schedule/unschedule jobs, delete a job, and view the properties of jobs. Jobs can be scheduled to run either immediately, at a specific time (daily, yearly), or in response to a trigger.
Note: Background jobs run on a separate workspace server, and as a result the log is not displayed “live” in the same main Log window as running code directly within SAS Studio using the Run icon. Additionally, any libraries that are created by your background program will not appear in the Libraries section of the SAS Studio.
Using SAS Studio to Schedule a Job
Jobs can also be scheduled using SAS Studio.
1. Click on the following link to access Open SAS Viya: https://qnetanalytics-viya.cms.gov/.
2. Go to SAS Studio.
3. Right click on the code to be scheduled as a job and select Schedule as a job.
4. To create a New Trigger, enter Name, Frequency, Interval, Time, Time zone, Start date, and End type. Click Save.
Note: If you users want your their job to run only run once, then they can change the End type to A fter After number of times and select 1 for the number of times.
5. Job can be viewed in SAS Environment Manager.
Using Environment Manager to Schedule a Job
- Click on the following link to access Open SAS Viya: https://qnetanalytics-viya.cms.gov/SASDrive/
- Go to Manage Environment.
3. Click the Jobs icon on the left panel.
4. Click the Scheduling tab.
5. Click the New drop-down menu and select → select Job.
6. Enter name of the New job, then click the Browse icon.
7. Locate the SAS file the job will run. Select the job and click OK.
8. Once again, click Click OK to save the job.
9. Right click on the job name and select Schedule.
10. Click the plus sign to add a new trigger.
11. To create a New Trigger, enter Name, Frequency, Interval, Time, Time zone, Start date, and End type. Click Save.
12. Once again, click Click Save.
Note: Prior to saving, additional triggers can be created.
Note: Once the job is complete, the entire log file is written to your a user's folder of choice. The output folders can be changed in Options > Preferences > Background Submit.
If the code is running too long in background mode and encountering errors, then steps can be added manually throughout the SAS code to stop the program from running once the conditions are met (e.g., if _ERROR_ = 1 then abort return; to stop the SAS session). Once the SAS code stops running, the SAS log can then be opened in full.
Deleting a Job
1. Click on the following link to access SAS Viya: https://qnetanalytics-viya.cms.gov/Open SAS Viya.
2. Go to the list of Jobs in SAS Environment Manager.
3. Right click on the relevant job you wish to delete and click Delete.
4. Click Yes, when prompted to confirm that you want to delete the jobdeletion.
View the Properties of Jobs
1. Click on the following link to access Open SAS Viya: https://qnetanalytics-viya.cms.gov/.
2. Go to the list of Jobs in SAS Environment Manager.
3. Right click on the job name and select Properties.
Related articles
Content by Label | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Page properties | ||
---|---|---|
| ||
|
HTML |
---|
<style>#title-text { display:none !important; } .aui-navgroup-primary { font-size: 1.25em; font-weight: bold; } .page-metadata-modification-info { display:none !important; } </style> |