Finding and releasing held schedule entries

Log in to save

First look at what is held:

SELECT SCHEDULED_JOB_NAME, STATUS, SCHEDULE_DATE, SCHEDULE_TIME, TEXT_DESCRIPTION
  FROM QSYS2.SCHEDULED_JOB_INFO
 WHERE STATUS = 'HELD'

Then release them one at a time, giving the entry number shown by WRKJOBSCDE:

RLSJOBSCDE JOB(CLOSE) ENTRYNBR(000042)

Warning

releasing an entry does not recover the runs that were missed. If the job was due last night and the entry was held, run it by hand after checking that the processing can be repeated without duplicating data.

Tip

entries get held during maintenance and then nobody remembers to release them. It is worth putting the query above into a check that runs every morning and reports anything it finds: five minutes of work, and a whole class of failures disappears.


Releases. WRKJOBSCDE and RLSJOBSCDE exist on any release. The QSYS2.SCHEDULED_JOB_INFO view arrived with IBM i Services: if the query answers SQL0204, the same list is available from WRKJOBSCDE, only on screen rather than queryable.

← Back to blog

Comments

No comments yet. Be the first to comment!

You need an account to comment. Log in · Sign up