{
dequeue_messages(jcr); /* display any queued messages */
set_jcr_job_status(jcr, TermCode);
- run_scripts(jcr, jcr->job->RunScripts, "AfterJob");
update_job_end_record(jcr);
}
Pmsg1(0, _("Unimplemented job type: %d\n"), jcr->JobType);
break;
}
+ }
- /* Send off any queued messages */
- if (jcr->msg_queue && jcr->msg_queue->size() > 0) {
- dequeue_messages(jcr);
- }
+ run_scripts(jcr, jcr->job->RunScripts, "AfterJob");
+
+ /* Send off any queued messages */
+ if (jcr->msg_queue && jcr->msg_queue->size() > 0) {
+ dequeue_messages(jcr);
}
generate_daemon_event(jcr, "JobEnd");