<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Enterprise Guide - Scheduled Job in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Scheduled-Job/m-p/134928#M10894</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cynthia, this one is more difficult than dates....&lt;BR /&gt;Eguide 4.1 (SAS 9.1.3) scheduling is working on the local machine/desktop. &lt;BR /&gt;The Windows schedule manager is used for that. If that is not present or closed as you are probably working on a office desktop,&amp;nbsp; it could fail here.&lt;/P&gt;&lt;P&gt;Also the desktop must be able to start by the windows schedule manager at that moment.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to use this try to do it in a simple progam in a verifyable way. The generated VBS should work and the schedule manager displaying the info.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Nov 2013 20:37:16 GMT</pubDate>
    <dc:creator>jakarman</dc:creator>
    <dc:date>2013-11-07T20:37:16Z</dc:date>
    <item>
      <title>Enterprise Guide - Scheduled Job</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Scheduled-Job/m-p/134927#M10893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a SAS EG 4.1 project that I would like to run monthly as a scheduled job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tries using tools &amp;gt; schedule project and scheduling a vbs script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For some reason the script is run by Windows, but the project is not run in SAS EG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the content of the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;Could you please help me schedule an automatic job.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Option Explicit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim app&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call dowork&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'shut down the app&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not (app Is Nothing) Then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;app.Quit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set app = Nothing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub dowork()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Error Resume Next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'----&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;' Start up Enterprise Guide using the project name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'----&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim prjName&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim prjObject&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;prjName = "C:\P2P v3.egp" 'Project Name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set app = CreateObject("SASEGObjectModel.Application.4")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Checkerror("CreateObject") = True Then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exit Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'-----&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;' open the project&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'-----&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set prjObject = app.Open(prjName,"")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Checkerror("app.Open") = True Then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exit Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'-----&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;' run the project&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'-----&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;prjObject.run&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Checkerror("Project.run") = True Then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exit Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'-----&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;' Save the new project&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'-----&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;prjObject.Save&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Checkerror("Project.Save") = True Then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exit Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'-----&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;' Close the project&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'-----&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;prjObject.Close&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Checkerror("Project.Close") = True Then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exit Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function Checkerror(fnName)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Checkerror = False&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim strmsg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim errNum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Err.Number &amp;lt;&amp;gt; 0 Then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;strmsg = "Error #" &amp;amp; Hex(Err.Number) &amp;amp; vbCrLf &amp;amp; "In Function " &amp;amp; fnName &amp;amp; vbCrLf &amp;amp; Err.Description&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'MsgBox strmsg 'Uncomment this line if you want to be notified via MessageBox of Errors in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Checkerror = True&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End Function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 20:14:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Scheduled-Job/m-p/134927#M10893</guid>
      <dc:creator>cynthya</dc:creator>
      <dc:date>2013-11-07T20:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide - Scheduled Job</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Scheduled-Job/m-p/134928#M10894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cynthia, this one is more difficult than dates....&lt;BR /&gt;Eguide 4.1 (SAS 9.1.3) scheduling is working on the local machine/desktop. &lt;BR /&gt;The Windows schedule manager is used for that. If that is not present or closed as you are probably working on a office desktop,&amp;nbsp; it could fail here.&lt;/P&gt;&lt;P&gt;Also the desktop must be able to start by the windows schedule manager at that moment.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to use this try to do it in a simple progam in a verifyable way. The generated VBS should work and the schedule manager displaying the info.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 20:37:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Scheduled-Job/m-p/134928#M10894</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2013-11-07T20:37:16Z</dc:date>
    </item>
  </channel>
</rss>

