The Schedule task in SAS Enterprise Guide creates a VBScript file that Windows Task Scheduler uses to execute a project in batch on a specified schedule. To successfully schedule a SAS Enterprise Guide project, follow these guidelines:
-
- The recommended and default Windows Task Scheduler security setting for running SAS Enterprise Guide projects is Run only when user is logged on.
- The Windows user must be able to use Windows Task Scheduler. The user must be able to execute VBScript programs independently of SAS Enterprise Guide.
- Metadata credentials must be cached in the SAS Enterprise Guide user's connection profile. To see this information, navigate to Tools ► Connections. Choose the active server and click Modify to open the Connection profile. Make sure that the Save login in profile option is checked and that the selection persists. If it does not persist, contact your SAS® metadata administrator and request the ability to cache metadata credentials.
- Credentials must persist throughout the SAS Enterprise Guide session. To check this setting, navigate to Tools ► Options ► Security. The option Credentials Persistence must be set to Persist during EG session.
- A scheduled project does not execute if the project is open. Ensure that you have saved and closed the project before it is scheduled to execute in batch.
- SAS Enterprise Guide must be installed on the machine where the VBScript file is scheduled to execute.
- The project must execute successfully from VBScript outside of Windows Task Scheduler. Execute the VBScript outside of Windows Task Scheduler to verify the project runs successfully in batch.
Suggestions for using Run whether user is logged on or not:
- Use of this security context depends on Windows settings, not SAS Enterprise Guide settings. As these settings vary based on company security policies, it is often difficult to use this Task Scheduler security context. For example, it might be allowed due to company restrictions.
- The Windows user ID that is used to schedule the project must have Local Administration rights and the Log on as a batch job privilege.
- You will likely need to open SAS Enterprise Guide using "Run as Administrator" before using the Schedule task. Windows 8 and later operating systems do not open applications using Administrator privileges by default. Because Run whether user is logged on or not requires Administrator privileges, SAS Enterprise Guide must be opened with elevated Admin rights.
- The project and VBScript must be saved to your local computer (not a network drive or SharePoint, and so on.) to use the Run whether user is logged on or not security option.
- To use the Run whether user is logged on or not Task Scheduler security context, select File ► Schedule Project. On the General tab, deselect the option Do not store password. The Run with Highest Privileges option might or might not be needed. Test with this option selected and without it selected.
- On the General tab, select Windows Server 2003, Windows XP, or Windows 2000 for the Configure for option.

- When you click OK in the Task Scheduler dialog box, you are prompted to enter a Windows user ID and password. On the Triggers tab, specify when Task Scheduler should execute the project. A .vbs file is added to the project. Save the project and close it so that it can be successfully executed in batch as scheduled.
- For a project to Run whether user is logged on or not, it might be necessary to copy the ConfigurationVxx.xml file, where xx is the version of SAS Enterprise Guide, from the %appdata%\SAS\MetadataServerProfiles folder into the C:\Windows\System32\config\systemprofile\AppData\Roaming\SAS\MetadataServerProfiles folder or the C:\Windows\SysWOW64\config\systemprofile\AppData\Roaming\SAS\MetadataServerProfiles folder.
- For access to network resources when Run whether user is logged on or not is selected, you must disable the Windows local security option Network access: Do not allow storage of passwords and credentials for network authentication.