<?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: Schedule in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Schedule/m-p/338580#M22482</link>
    <description>&lt;P&gt;Hi SASNE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can test if the .vbs file works by adding a MsgBox comment inside the script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Sub dowork()
    On Error Resume Next
	
	'----
    ' Start up Enterprise Guide using the project name
    '----
    Dim prjName
    Dim prjObject
	Dim containerName     ' As String
    Dim containerObject   ' As SASEGuide.Container
    Dim containerColl     ' As SASEGuide.ContainerCollection

    prjName = "G:\Database_Project.egp"    'Project Name
	
'Add code here

MsgBox "Hi I'm working!"

Rest of code below here ...&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now if you double click the file, you should see a dialogue box pop up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if it doesn't happen.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next we want to check that TS is working to run this .vbs file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The process is that TS creates a batch file that has the path to the .vbs file &amp;amp; it's the .vbs file that triggers the SAS EG project.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Go to your TS &amp;amp; right click to go to Properties &amp;gt;&amp;gt; &amp;amp; on the Actions tab.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Highlight the path in the Actions box &amp;amp; click on 'Edit'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Amend your details in the Actions Tab to what's shown in the Attached picture.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ensure you add " " around the path of the .vbs file shown in the 'Add arguments (optional)' box.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the General tab, use the 'Run only when User is logged on &amp;amp; all other stttings can stay the same for now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We want to get to a stage where the running of the Task in TS gets you a Pop up message from the .vbs file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So now save everything, go to TS &amp;amp; right click on the task &amp;amp; click 'Run'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know how you go.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13529iC5D7E89DE3C04924/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Action.PNG" title="Action.PNG" /&gt;</description>
    <pubDate>Mon, 06 Mar 2017 21:20:55 GMT</pubDate>
    <dc:creator>OscarBoots1</dc:creator>
    <dc:date>2017-03-06T21:20:55Z</dc:date>
    <item>
      <title>Schedule</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Schedule/m-p/338241#M22463</link>
      <description>&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i select Schedule Program A and choose Repeat task every 1 hour and indefinitely. Then the Schedule creates the vbs (and the Run times tabs show the expected run time.&lt;/P&gt;&lt;P&gt;But it haven't run at all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Mar 2017 13:48:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Schedule/m-p/338241#M22463</guid>
      <dc:creator>SASNE</dc:creator>
      <dc:date>2017-03-05T13:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Schedule</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Schedule/m-p/338342#M22465</link>
      <description>&lt;P&gt;Hi SASNE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've found that I need to create the files myself to ensure they all work as required.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have scheduled a task, you should see it in the Windows&amp;nbsp;Task Scheduler (TS) program.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you go the TS &amp;gt;&amp;gt; find your Task &amp;gt;&amp;gt; right click &amp;amp; open the properties &amp;gt;&amp;gt; go to the 'Actions' tab &amp;amp; you'll see the path to the .vbs file that runs the SAS EG Project.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Double click on that file to see if it runs the Project (Make sure the Project runs quickly or coment some parts out so you don't have to wait around&amp;nbsp;to test this).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it runs the project, the issue is with the Task at the Task Scheduler end (which it usually is I've found).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try these steps &amp;amp; let me know how you go.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 03:41:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Schedule/m-p/338342#M22465</guid>
      <dc:creator>OscarBoots1</dc:creator>
      <dc:date>2017-03-06T03:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: Schedule</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Schedule/m-p/338347#M22467</link>
      <description>&lt;P&gt;Hi Oscar,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help. I have tried to open The VBS file either by Double click it in window environment and by CMD environment, it just run without prompting anything (&amp;nbsp; as below).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CMD&lt;/P&gt;&lt;P&gt;C:\Project&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ITypeVBSName&lt;/P&gt;&lt;P&gt;C:\Project&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Window&lt;/P&gt;&lt;P&gt;it runs without opening EG&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S The vbs created by SAS EG&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have either closed&amp;nbsp; the program&amp;nbsp; and left it on for testing&lt;/P&gt;&lt;P&gt;-----------------------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I test it by exporting a dataset to local directory at the end of the process , but it never create the dataset neither overwrite it once.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any idea ?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 04:11:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Schedule/m-p/338347#M22467</guid>
      <dc:creator>SASNE</dc:creator>
      <dc:date>2017-03-06T04:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: Schedule</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Schedule/m-p/338580#M22482</link>
      <description>&lt;P&gt;Hi SASNE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can test if the .vbs file works by adding a MsgBox comment inside the script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Sub dowork()
    On Error Resume Next
	
	'----
    ' Start up Enterprise Guide using the project name
    '----
    Dim prjName
    Dim prjObject
	Dim containerName     ' As String
    Dim containerObject   ' As SASEGuide.Container
    Dim containerColl     ' As SASEGuide.ContainerCollection

    prjName = "G:\Database_Project.egp"    'Project Name
	
'Add code here

MsgBox "Hi I'm working!"

Rest of code below here ...&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now if you double click the file, you should see a dialogue box pop up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if it doesn't happen.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next we want to check that TS is working to run this .vbs file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The process is that TS creates a batch file that has the path to the .vbs file &amp;amp; it's the .vbs file that triggers the SAS EG project.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Go to your TS &amp;amp; right click to go to Properties &amp;gt;&amp;gt; &amp;amp; on the Actions tab.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Highlight the path in the Actions box &amp;amp; click on 'Edit'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Amend your details in the Actions Tab to what's shown in the Attached picture.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ensure you add " " around the path of the .vbs file shown in the 'Add arguments (optional)' box.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the General tab, use the 'Run only when User is logged on &amp;amp; all other stttings can stay the same for now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We want to get to a stage where the running of the Task in TS gets you a Pop up message from the .vbs file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So now save everything, go to TS &amp;amp; right click on the task &amp;amp; click 'Run'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know how you go.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13529iC5D7E89DE3C04924/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Action.PNG" title="Action.PNG" /&gt;</description>
      <pubDate>Mon, 06 Mar 2017 21:20:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Schedule/m-p/338580#M22482</guid>
      <dc:creator>OscarBoots1</dc:creator>
      <dc:date>2017-03-06T21:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Schedule</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Schedule/m-p/338949#M22509</link>
      <description>&lt;P&gt;If this process is a business-critical one then I would advise against scheduling this on a PC. Your SAS server is designed for handling these tasks a lot better and a lot more reliably. Of course I'm assuming here that your EG uses a SAS remote server. If you are using local SAS on the PC then please ignore my comment.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 19:24:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Schedule/m-p/338949#M22509</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2017-03-07T19:24:01Z</dc:date>
    </item>
  </channel>
</rss>

