As mentioned, I dont have any access to scheduling software at work and have a growing list of ongoing reports to keep up with. I'd like to build code or use some sort of functionality within SAS Studio to automate the execution of my code.
Below is what I have put together currently (with a generic report location/name). It will currently run every 5 hours, 8 times so I can check what's happening but would move to running every 24 hours once it works so I would only have to background submit once a week. However, right now, it only looks for the DOM the first time through the loop and then will run the report all 8 times if that criteria was met the first time through. So if it's the 2nd of the month, even if after 4 loops (20 hours) later if it's then the 3rd of the month it is still running the report. I want it to look for the date on each iteration and only execute the code if it's the date given. Thanks!!
%let currentDT = %sysfunc(datetime());
%let currentDate = %sysfunc(today());
data _null_;
wait_sec= '20:00:00't-timepart(datetime());
zzz=sleep(wait_sec,1);
run;
%macro dailyrun (DOM=day(¤tDate));
%do i=1 %to 8;
data _null_;
if &DOM in (2) then do;
call execute ('%include "/sasdata/folder/nameofreport.sas";');
end;
else;
run;
data _null_;
zzz2=sleep(18000000);
run;
%END;
%mend dailyrun;
%dailyrun()