EXEC msdb.dbo.sp_start_job @job_name = N'D91030 - Backup ActivePos_Read' , @step_name = 'Purge old ActivePos_Read backups'

WAITFOR DELAY '00:00:05.000'

WHILE EXISTS(
    SELECT sj.name
       , sja.*
    FROM msdb.dbo.sysjobactivity AS sja
    INNER JOIN msdb.dbo.sysjobs AS sj ON sja.job_id = sj.job_id
    WHERE sj.[name]='D91030 - Backup ActivePos_Read'
       AND sja.start_execution_date IS NOT NULL
       AND sja.stop_execution_date IS NULL
) BEGIN
    PRINT 'job is still running '+CONVERT(VARCHAR(20), CURRENT_TIMESTAMP, 120);
    WAITFOR DELAY '00:00:05.000'
END 