BookmarkSubscribeRSS Feed
R_Chung
Quartz | Level 8

Hello everyone, 

 

Here is a job(main_job)  which include a file event and a subjob as follow.

delete.png 

  1. I want to run the main_job seconds by seconds, which means the job is always running without exiting.
  2. Then I want to trigger the testFileEvent job to be ran by modifying the file, which means the testFileEvent job will run when the file in the file event is edited. Every time when I click "save" to save the file, then the testFileEvent job runs.

Thankyou

9 REPLIES 9
error_prone
Barite | Level 11

Are you talking about a program started in SAS Studio? 

 

You can create an infinite loop checking the file modification time and trigger another program as soon as a modification is recognized. 

 

I don't know how to setup such a process with the jobs defined in metadata.

R_Chung
Quartz | Level 8

I am doing it in sas management console

BeverlyBrown
Community Manager

Hi @R_Chung, are you using DI Studio? An internal expert here at SAS is asking. If so, it may make sense to move this thread over to the Data Management Community, where more of your peers are equipped to answer. Thanks, @LinusH and @error_prone, for helping clarify the question!

Register now for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

R_Chung
Quartz | Level 8
I have no idea how to implement in either SMC or DI or both
LinusH
Tourmaline | Level 20
A subjob is not a concept of SMC Scheduling Manager. You can define outer/inner jobs in DI Studio. What does your main job actually do?
File events is ASFAIK available only for Platform LSF, do you have that?
Data never sleeps
LinusH
Tourmaline | Level 20
Ok, but to be able to get any relevant feedback start by answering my questions.
Perhaps describe the overall application and requirements.
If you don't even where to start I think you might need some on site support.
Data never sleeps
R_Chung
Quartz | Level 8
@LinusH
In high level description, when there is any modification from a file, this action should trigger a job to start.

e.g.
file a
job b

when I edit file a and save it
this action will trigger job b to run
LinusH
Tourmaline | Level 20
So, again, if you have Platform LSF I think there is a file event for modifications (I don't have access to SAS nor LSF at this point to verify).
Otherwise you probably need to develop a scripts of some sort to do this. If you have another scheduling tool at your site talk to the maintenance team for that, they should be able to help you.
Either way, no need for a main job. Just create the jobs you see fit, and leave the event handling to the scheduler. In case of a non SAS supported schedule, still create the job flow in SMC Scheduling Manager, and deploy it for manual execution. Then an OS script is created that can be called by the schedule of your choice.
Data never sleeps
R_Chung
Quartz | Level 8
thanks and let me check in LSF

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
  • 9 replies
  • 2248 views
  • 1 like
  • 4 in conversation