07-16-2015 01:42 PM
I would like to test the system performance using SAS EG Projcet sample project, By executing EG Project batch schedule.
User created and saved in SASApp machine(Unix),the project code read data from '.csv' file which is available in Unix machine.
system Meta, App and Web servers configured on UNIX machines.
How to use that EG Project (from Unix)and schedule to run, once 10 minutes and generate log for each EG schedule running session to check CPU time and process time?
1. I have tried to create batch file to schedule using SAS EG 6.1. ---- File> Schedule, - ( but schedule option is grayed out). .
2. I have opened abc.egp project from Unix path and saved as to local machine(cause it prompt me to have project on local machine to schedule).
3. Then I opened abc.egp project from windows location, I could see "schedule abc", then followed the steps on like frequency to run and intervals in between.
but the scheduled process created one .vb script on desktop, which is not working.
as per the scheduled time, the batch script is not running and not generatin log file as per below code in C:\Temp\test folder(created test folder under C:\Test\)
Added this code to run before execute SAS code in SAS EG >Tools>Options > SAS Programs >insert custom SAS code before submitted code
options dtreset fullstimer;
%let SAS_ListingDateTimeStamp = SAS_Listing_%sysfunc(putn(%sysfunc(date()),yymmdd10.))__%sysfunc(translate(%sysfunc(putn(%sysfunc(time()),timeampm12.)),.,);
%let ListingOutFile = C:\temp\test\&SAS_ListingDateTimeStamp..txt;
ods listing file="&ListingOutFile";
%let SAS_LogDateTimeStamp = SAS_Log_%sysfunc(putn(%sysfunc(date()),yymmdd10.))__%sysfunc(translate(%sysfunc(putn(%sysfunc(time()),timeampm12.)),.,);
%let LogOutFile = C:\temp\test\&SAS_LogDateTimeStamp..txt;
filename logfile "&LogOutFile";
proc printto log=logfile;
Am i missing anything and doing incorrectly to generate log for each schedule SAS EG Session? Please comment how to run the scheduled batch job for SAS EG job?
07-16-2015 03:47 PM
EG projects can only be scheduled on the computer where EG is installed.
If you want to schedule on your SAS server you need to export your EG project to SAS code and then schedule the code files.
These references should be helpful: https://communities.sas.com/message/223670#223670
07-20-2015 01:25 PM
Thank you for your reply.
I have SAS EG 6.1 on windows 7 and SAS servers are configured on Unix machines.
My SAS EG Projects been saved in Unix Machine directories.
I have Saved as SAS EG Prpject to local machine (Win 7) and tried to schedule, but no luck.
07-20-2015 02:11 PM
"but no luck" will need more data. does it mean the VBA script did not fire up EG at all or EG project failed to deliver expected outcome. If it is the latter, can you obtain project logs? have you remained logged-in when the job is scheduled to run? if no, are you able to save your credentials so that it can be retrieved when needed? many parts could go wrong when doing scheduling.
I am aware that you are doing it on workstation level, just fyi, LSF scheduler is recommended to use on server level, however, I don't think you can schedule EG projects on server.
07-28-2015 04:30 PM
The first thing I always do when planning out a Windows Task Scheduler process through SAS is verify that the VBS script kicks off the job and I get a log when it is executed directly.
So, skip the scheduling step and verify that when executed, the VBS script is actually running SAS. Just double click the generated EGScript.vbs file that was created by SAS and check for the log where you directed it.
If this isn't working, try the following:
uncomment the line in the vbs script that says: " 'MsgBox strmsg 'Uncomment this line if you want to be notified via MessagBox of Errors in the script "
Just remove the single-quote in front of the 'MsgBox strmsg line.
Try and execute the vbs script again by double clicking on it. You will receive a message popup if there are any issues. Try that and we can surely help further.
I've been at sites where security prevented VBS scripts from running, and even where security prevented the scripts from writing to temporary folders. This all becomes very difficult to identify when testing through the scheduler itself.
07-29-2015 03:03 AM
Why fuzz around with a plaything when you have a real operating system at hand? Export your SAS code to a .sas file on UNIX, and use crontab to schedule "sas progname.sas" like this:
a (this causes the editor to enter "append" mode)
0,10,20,30,40,50 * * * * sas progname.sas
(hit ESC, then ":" and "x" to end the editor session)
From now on, the job will run at the specified minutes, every hour.
If you want to keep track of performance, use
time sas progname.sas >> $HOME/times.log
as the command in the crontab, and you will find a list of the time stats of each job run in $HOME/times.log
Information about the basic UNIX scheduling facility can be found here: