BookmarkSubscribeRSS Feed
Jade_SAS
Pyrite | Level 9

Hi All,

 

    I automated SAS Enterprise Guide program by generating a VBScript and scheduled it with the task scheduler. This automated task should run daily, but somehow the task seems not stable. Most of the time it ran, sometimes (some random day, happen once a week or every two weeks randomly) it did not. I could not figure out the reason for it.

   The details:

   1) I am using SAS server on Linux;

   2) I used the windows task scheduler to schedule to VBScript at daily frequency.

   3) In the SAS Enterprise code, I need to access data at SQL server and output the final table to SQL server.

   4) even sometime the SAS code did not run, the task schedule still shows the task run successfully. See the attachement (today the code did not run, but the task still show it runs successfully).

 

    SSo what's the possible reason for that? SAS to SQL connnection is not stable?

 

Thanks,

Jade

  

 


Task_scheduler.PNG
4 REPLIES 4
ballardw
Super User

I suspect the Task Scheduler reports "success" if it was able to send the appropriate start commands and not get an immediate error: ie SAS started.

 

What to the SAS logs of the incomplet runs show? I would look for messages about unable to access/connect or set not available.

 

Once upon a time we had issues with Windows services getting interrupted and not restarting, so the SQL Server side may have an issue similar to that.

 

If you can't find logs or have suppressed them for some reason I suggest making sure that each time the process runs it creates a log. At least you could indentify connection issues and diagnose other SAS specific issues.

Jade_SAS
Pyrite | Level 9

Thank you! @ballardw

 

There is no error message in the SAS log file as the SAS program did not run at all.

It seems the Task Scheduler ran successfully but the SAS code is not triggered at all. So strange, I could not figure out the reason for that.

 

Thanks,

Jade

ballardw
Super User

You may want to try posting the resolved command line that should be sent to SAS to start your job.

 

You may be missing an element. Compare to the command string properties of a SAS launching shortcut for starters. Look in the online documentation for Batch jobs for other hints. 

 

If your SAS install is a server version then you may need additional bits to connect to the server (not sure what they may be because I don't work in server environment) and use the correct scheduler.

 

GenDemo
Quartz | Level 8

Hi I have a similar issue.

 

aside: I have also posted on this thread https://communities.sas.com/t5/SAS-Enterprise-Guide/Some-SAS-EG-projects-not-running-through-Task-Sc...

 

I have a number of task scheduled on a virtual machine, and some run fine and other not. And then when I open them and run manually there is no error. Task scheduler kicks of at the right time and according to it the process ran fine with no error. The project usually runs about 40-50 mins. Often task scheduler even reflects this time, though it sometimes shows that it only ran for 20 mins. However, nothing actually happens. Problem is that the symptoms are quite erratic and intermittent. One of two things seem to happen (or not happen):

 1. it seems that the .VBS script does not launch SAS... and it just sits there doing who knows what for 40 odd mins.

 2. the .VBS script initiates SAS, but then nothing happens. And even this process often takes 15 mins for it to create the session and work library.

2018_12_10_10_08_35_sasmetaau.bmwgroup.net_SASWork_TD502644_SSAU0234_Prc2.png

About a week ago... it started running fine again with no issue. Then this week its giving the same issue again. Its driving me nuts and I dont know what is going on.

Any advice would be greatly appreciated. I have tried rescheduling the job multiple times to no avail.

 

We are running on Windows: Windows SAS server and the VM is running on Windows Server 2012 R2

 

GD

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!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1809 views
  • 0 likes
  • 3 in conversation