IBM Support

IJ35784: CRONTASK WITH A FREQUENCY SET TO "EVERY 3 MONTH(S)" OR EVEN MORE WILL NOT RUN

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • ERROR DESCRIPTION:
    Crontask with a frequency set to "Every 3 month(s)" or even
    more will not run
    
    PROBLEM:
    You may face the scenario where you no longer receiving some of
    the scheduled reports (specifically the ones that are running
    on a 3 or 4 month increments.)
    
    Using a frequency for the crontask as 1 week, or 1 month, makes
    the REPORTSCHEDULE crontask run fine.
    
    However when the REPORTSCHEDULE crontask name has a frequency
    of 3 months or more, it simply does not run, no errors in the
    log.
    
    This problem can be simulated by setting a cron task instance
    to run every 10 minutes, reproducible steps:
    
    1. Take an existing crontask, for example RemoveDeadSessions.
    Remove all its active instances and cron task history. You can
    do it in the back end:
    delete from taskscheduler where taskname like
    'RemoveDeadSessions%';
    delete from  crontaskhistory where crontaskname like
    'RemoveDeadSessions%';
    COMMIT;
    
    2. Create a new instance, set the schedule to be every 10
    minutes.
    
    3. Before the 10 minutes is up, stop the server
    
    4. Restart server, wait a few minutes and stop the server.
    Repeat this step as many times as you want.  You will see that
    the cron task instance is never run.  This is because every
    time a server restart happens, the cron task is scheduled to
    run 10 minutes later but the server gets restarted before it
    reaches 10 minutes so the cron task never gets to run.  In
    reality, this only happens to cron tasks that are scheduled to
    run months or years apart as the chances of the server being
    restarted within that timeframe is high.
    
    This problem can be worked around by manually setting the
    taskscheduler.lastrun field after such a cron task instance is
    created, or have an automation script to do that.  Then it will
    be scheduled as if it was last run at the time specified in
    that field. To fix this in the code, if cron task has never
    run, will use its reload request time
    (crontaskinstance.reloadreqtime, instead of the null
    taskscheduler.lastrun) as the starting time to calculate the
    next run schedule.
    
    STEPS TO REPLICATE :
    1. Open maximo as maxadmin user
    2. Ensure you have a crontask (REPORTSCHEDULE) with the
    frequency set to "Every 3 month(s)" or even more
    3. The crontask will never run
    
    OR
    
    This problem can be simulated by setting a cron task instance
    to run every 10 minutes, reproducible steps:
    
    1. Take an existing crontask, for example RemoveDeadSessions.
    Remove all its active instances and cron task history. You can
    do it in the back end:
    delete from taskscheduler where taskname like
    'RemoveDeadSessions%';
    delete from  crontaskhistory where crontaskname like
    'RemoveDeadSessions%';
    COMMIT;
    
    2. Create a new instance, set the schedule to be every 10
    minutes.
    
    3. Before the 10 minutes is up, stop the server
    
    4. Restart server, wait a few minutes and stop the server.
    Repeat this step as many times as you want.  You will see that
    the cron task instance is never run.  This is because every
    time a server restart happens, the cron task is scheduled to
    run 10 minutes later but the server gets restarted before it
    reaches 10 minutes so the cron task never gets to run.  In
    reality, this only happens to cron tasks that are scheduled to
    run months or years apart as the chances of the server being
    restarted within that timeframe is high.
    
    This problem can be worked around by manually setting the
    taskscheduler.lastrun field after such a cron task instance is
    created, or have an automation script to do that.  Then it will
    be scheduled as if it was last run at the time specified in
    that field. To fix this in the code, if cron task has never
    run, will use its reload request time
    (crontaskinstance.reloadreqtime, instead of the null
    taskscheduler.lastrun) as the starting time to calculate the
    next run schedule.
    
    NOTE : If the same crontask is to run every 1 week, or every 1
    month, it works OK.
    
    
    CURRENT ERRONEOUS RESULT:
    The crontask will never run
    
    EXPECTED RESULT:
    The crontask will run
    
    ENVIRONMENT (SYSTEM INFO):
    App Server IBM WebSphere Application Server 9.0.0.10
    Tivoli's process automation engine 7.6.1.2-IFIX20210104-1913
    Build 20200715-0100 DB Build V7612-284 HFDB Build HF7612-15
    IBM Maximo Asset Management Work Centers 7.6.0.4 Build
    20200715-0100 DB Build V7604-119 HFDB Build HF7680-10
    IBM Maximo Asset Management Scheduler 7.6.8.0 Build
    20200715-0100 DB Build V7680-148 HFDB Build HF7680-15
    IBM Tpae Integration Framework
    7.6.1.2-MIF_7612_IFIX.20200909-1113 Build 20200715-1444 DB
    Build V7612-11
    IBM Maximo Asset Management 7.6.1.2 Build 20200715-0100 DB
    Build V7611-01
    IBM Maximo for Oil and Gas 7.6.1.0-20200805-1125 Build
    20161020-0803 DB Build V7610-139 HFDB Build HF7610-56
    IoT Connection Utility 7.6.0.3 Build 20200701-1409 DB Build
    V7603-32
    Ontracks MaxEdit 7.6.0.1 Build 20180910-1005 DB Build V7601-01
    Server OS Linux 4.4.0-1114-aws
    Server DB DB2/LINUXX8664 11.1 (SQL11014)
    

Local fix

  • This problem can be simulated by setting a cron task instance
    to run every 10 minutes, reproducible steps:
    
    
    
    1. Take an existing crontask, for example RemoveDeadSessions.
    Remove all its active instances and cron task history. You can
    do it in the back end:
    
    
    
    delete from taskscheduler where taskname like
    'RemoveDeadSessions%';
    
    delete from  crontaskhistory where crontaskname like
    'RemoveDeadSessions%';
    
    COMMIT;
    
    
    
    2. Create a new instance, set the schedule to be every 10
    minutes.
    
    
    
    3. Before the 10 minutes is up, stop the server
    
    
    
    4. Restart server, wait a few minutes and stop the server.
    Repeat this step as many times as you want.  You will see that
    the cron task instance is never run.  This is because every
    time a server restart happens, the cron task is scheduled to
    run 10 minutes later but the server gets restarted before it
    reaches 10 minutes so the cron task never gets to run.  In
    reality, this only happens to cron tasks that are scheduled to
    run months or years apart as the chances of the server being
    restarted within that timeframe is high.
    
    
    
    
    
    This problem can be worked around by manually setting the
    taskscheduler.lastrun field after such a cron task instance is
    created, or have an automation script to do that.  Then it will
    be scheduled as if it was last run at the time specified in
    that field.
    
    
    
    To fix this in the code, if cron task has never run, will use
    its reload request time (crontaskinstance.reloadreqtime,
    instead of the null taskscheduler.lastrun) as the starting time
    to calculate the next run schedule.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * MAXIMO                                                       *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * When Application is restarted every month, crontasks which   *
    * are scheduled to run every 2 or more months never run.       *
    ****************************************************************
    

Problem conclusion

  • The fix for this APAR will be contained in a future release.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IJ35784

  • Reported component name

    SYSTEM CONFIG

  • Reported component ID

    5724R46S1

  • Reported release

    761

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2021-10-26

  • Closed date

    2022-09-21

  • Last modified date

    2022-09-21

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    SYSTEM CONFIG

  • Fixed component ID

    5724R46S1

Applicable component levels

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSLKT6","label":"Maximo Asset Management"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"761","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
21 September 2022