# ask-community

Scott Hood

06/22/2022, 4:06 PM
Hey all, is there a current best practice for having a sensor that runs
job A
only when
job B
is successful? I saw some practices of building a sensor, and listening to the instance events, however in the filter types I only see things to filter certain assets and not certain jobs. Would I need to parse through the event records returned by the
to see if any of said events were triggered by a given job?
🤖 1

Scott Hood

06/22/2022, 4:15 PM
@Zach I read in support that there is a limitation for this that it doesn't support yielding a RunRequest:
Unless this has changed, or you can simply run the execute_in_process.


06/22/2022, 4:25 PM
ah okay I wasn't aware of that, good catch. I see your issue now with not being able to filter on a specific job. a cursory look at the RunStatusSensorDefinition source makes it seem you will need to filter on job name after collecting the event records, but I might be missing a different pattern people are using for this. sorry I'm not very helpful here

Scott Hood

06/22/2022, 4:27 PM
All good, ya I think I can just filter off the records but before I go down that route wanted to see if there was something cleaner, this seems like a use case that would be popular potentially popular but maybe abstracting my workflows into separate jobs using a sensor is breaking a pattern.....


06/22/2022, 5:56 PM
Hey Scott - here's an issue where we're tracking enabling run status sensors to yield run requests: I linked this slack thread from that issue.