BookmarkSubscribeRSS Feed
SASNE
Obsidian | Level 7

Hi Gurus,

 

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.

But it haven't run at all.

 

Any idea ?

 

Thanks

 

4 REPLIES 4
OscarBoots1
Quartz | Level 8

Hi SASNE,

 

I've found that I need to create the files myself to ensure they all work as required.

 

If you have scheduled a task, you should see it in the Windows Task Scheduler (TS) program.

 

If you go the TS >> find your Task >> right click & open the properties >> go to the 'Actions' tab & you'll see the path to the .vbs file that runs the SAS EG Project.

 

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 to test this).

 

If it runs the project, the issue is with the Task at the Task Scheduler end (which it usually is I've found).

 

Try these steps & let me know how you go.

 

 

SASNE
Obsidian | Level 7

Hi Oscar,

 

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 (  as below).

 

CMD

C:\Project>    ITypeVBSName

C:\Project

 

Window

it runs without opening EG

 

P.S The vbs created by SAS EG

       I have either closed  the program  and left it on for testing

-----------------------------------------------

 

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.

 

Do you have any idea ?

Thanks

 

OscarBoots1
Quartz | Level 8

Hi SASNE,

 

You can test if the .vbs file works by adding a MsgBox comment inside the script.

 

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 ...

 

Now if you double click the file, you should see a dialogue box pop up.

 

Let me know if it doesn't happen.

 

Next we want to check that TS is working to run this .vbs file.

 

The process is that TS creates a batch file that has the path to the .vbs file & it's the .vbs file that triggers the SAS EG project.

 

Go to your TS & right click to go to Properties >> & on the Actions tab.

 

Highlight the path in the Actions box & click on 'Edit'

 

Amend your details in the Actions Tab to what's shown in the Attached picture.

 

Ensure you add " " around the path of the .vbs file shown in the 'Add arguments (optional)' box.

 

On the General tab, use the 'Run only when User is logged on & all other stttings can stay the same for now.

 

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.

 

So now save everything, go to TS & right click on the task & click 'Run'.

 

Let me know how you go.

 

Cheers  


Action.PNG
SASKiwi
PROC Star

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. 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1133 views
  • 1 like
  • 3 in conversation