Find Agent Jobs Containing a String

Use this handy query to find all agent jobs that have steps containing a search string.

DECLARE @Search varchar(255)
SET @Search='usp_YourStoredProc'
 
SELECT j.name, j.enabled, s.step_id, s.database_name, s.subsystem, s.command
FROM msdb.dbo.sysjobsteps s
INNER JOIN msdb.dbo.sysjobs j ON s.job_id = j.job_id
WHERE command LIKE '%'+@Search+'%'
ORDER BY 1, 3

Thanks to this StackOverflow post for pointing me in the right direction.