@@ -17,10 +17,6 @@ export function run(job, triggeredBy = 'scheduler') {
1717 const runId = runResult . lastInsertRowid
1818 logger . info ( { jobId : job . id , runId, triggeredBy } , `Job "${ job . name } " started` )
1919
20- if ( job . ntfy_enabled && job . ntfy_on_run ) {
21- ntfySend ( job , { status : 'running' } ) . catch ( ( ) => { } )
22- }
23-
2420 const child = job . command_type === 'inline'
2521 ? spawn ( '/bin/sh' , [ '-c' , job . command ] , { stdio : [ 'ignore' , 'pipe' , 'pipe' ] } )
2622 : spawn ( job . command , [ ] , { shell : true , stdio : [ 'ignore' , 'pipe' , 'pipe' ] } )
@@ -74,13 +70,13 @@ export function run(job, triggeredBy = 'scheduler') {
7470 )
7571 ` ) . run ( job . id , job . id , maxRuns )
7672
77- logger . info ( { jobId : job . id , runId, status, exitCode, duration } , `Job "${ job . name } " finished` )
78-
7973 if ( status === 'error' && job . ntfy_enabled && job . ntfy_on_error ) {
8074 ntfySend ( job , { status, exitCode, stderr } ) . catch ( ( ) => { } )
8175 } else if ( status === 'success' && job . ntfy_enabled && job . ntfy_on_run ) {
8276 ntfySend ( job , { status, exitCode } ) . catch ( ( ) => { } )
8377 }
78+
79+ logger . info ( { jobId : job . id , runId, status, exitCode, duration } , `Job "${ job . name } " finished` )
8480 } )
8581
8682 return runId
0 commit comments