Jump to content
  • How to batch disable all active scheduled report jobs prior to an upgrade


    vchiem
    • Features: Scheduler Version: v7 Product: JasperReports® Server

    Issue:

    The Scheduled Jobs page has checkboxes against each job to allow the user to enable/disable the individual job. However, in a production environment where there can exist hundreds of active report jobs scheduled, it is a cumbersome task for any system administrator to manually disable all jobs. The premise for such a requirement could be to disable all active jobs prior to undertaking an upgrade so that the jobs will not be potentially triggered during the upgrade.

    There is no batch mode feature in the TIBCO JasperReports Server user interface to batch disable all active jobs. What alternatives are there to accomplish this ?

     


     

    Solution:

    The state of the scheduled job is stored in the repository table, qrtz_triggers and the column name is the trigger_state. When a job is disabled in the UI by unchecking the checkbox, the 'trigger_state' column reflects the state as "PAUSED". Although it is technically possible to update the table column using backend SQL update execution, such approach is unsupported and not a recommendation by Product Support due to its invasiveness, and as with all backend sql approaches in updating system tables, updating the table incorrectly can lead to data corruption. Despite the TIBCO JasperReports® Server UI not having a batch update mode, a different approach can be done using Web Services. The recommended approach is to use the REST API to 'pause' and 'resume' scheduled jobs. In the TIBCO JasperReports® Server REST API Reference, there is a POST method api which allows the system administrator to pause one or many or all scheduled jobs and subsequently to resume these jobs.

     

    For more detailed information, please refer to TIBCO JasperReports® Server REST API Reference sections "Pausing Jobs" and "Resuming Jobs". The direct links to the v7.1 documentation are:

    https://community.jaspersoft.com/documentation/tibco-jasperreports-server-rest-api-reference/v710/jobs-service#Pausing_Jobs  

    https://community.jaspersoft.com/documentation/tibco-jasperreports-server-rest-api-reference/v710/jobs-service#Resuming_Jobs


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...