/
Create Job Queue Entry

Create Job Queue Entry

Select the magnifying glass icon to type Job Queue Entries , and then choose the related link.

A new item is created from the job queue list by clicking the New button. To find a list of job queues, click the Magnifying Glass Icon (Search) and type the "Job Queue Items" section.

When you click New, a new Job Queue Item Card opens.

Description of the buttons in the top bar:

Process tab:

  • Set status to Ready

    • The state in which the task runs according to the set parameters

  • Restart

    • If the task is in a different state as "Ready", then using the Restart button will put the task in the "Ready" state

  • Show Error

    • If the task ended with an error, clicking this button displays an Error message with a description of the error

  • Set on Hold

    • If you want to change the parameters or you don't want the task to run for some time, set the button to the "Wait" state

  • Run once (foreground)

    • When the button is clicked, a copy of the open job is run once. This run does not affect the settings of the task. It does not shift the start day or time of the task. The job just runs as a copy and performs the action.

    • This copy does not record a single line in the log entries and, in the event of an error, does not write the error to the list of error messages. The error with a description is only displayed in the error message after the task is completed.

Job queue tab:

  • Report request page

    • For Object type to be run = task of the "Report" type, it is possible to run a task that will be filtered by the options in the dial.window of the report. After setting the dial. window, the Report Dialog Parameters field switches to = YES

  • Show Record

    • If the task is with a document stored in an internal database, the user can use the button to view it. (e.g. invoice)

  • Log Entries (Log Entries)

    • A list of completed task entries. The user can see with whom the status of the task has ended, error messages

 

Field:

General Tab

  • Object Type to Run

    • Specifies the type of object, report, or procedure that will be executed for the job queue item. After you specify the type, select the ID of the object of that type in the Object ID to run field.

    • If the "Procedure" type is selected, the Report Parameters tab will not be available

  • Object ID to Run

    • Specifies the ID of the object that is intended to run this labour. You can select an ID that is only from the object type that you specified in the Object type to run field.

  • Object Caption to Run

    • The name of the object that is selected in the Object ID field.

  • Description

    • A description of the job queue entry. You can edit and update the description on the Job Queue Entries tab. The description also appears in the Job Queue Entries window, but it cannot be updated.

  • Parameter String

    • Specifies a text string that is used as a parameter to job queues when it is executed.

  • Job Queue Category Code

    • Specifies the category code of the job queue to which the job queue item belongs. Select the field to choose a code from the list.

    • to version 24.4.

      • When a task runs, the scheduler checks to see if other tasks with the same category as the current job are running. If so, it reschedules the current job to a later time (about a few seconds later).

This sometimes leads to many rescheduled tasks.

  • From Version version 24.4

    • When a task runs, the scheduler checks to see if other tasks with the same category as the current job are running. If so, it reschedules the current job to run now and sets the job status to "inactive" and the job queue status to waiting.

      When an already running task completes, the scheduler checks to see if there are any other tasks with the same category waiting. If so, the task with the lowest priority for that category is activated (checks the creation date of the task and the priority field)

  • Priority (from version version 24.4)

    • When a task runs, the scheduler checks to see if other tasks with the same category as the current job are running. If so, it reschedules the current job to run now and sets the job status to "inactive" and the job queue status to waiting.

      When an already running task completes, the scheduler checks to see if there are any other tasks with the same category waiting. If so, the task with the lowest priority for that category is activated (checks the creation date of the task and the priority field).

  • User ID

    • Specifies the ID of the user who set the task to ready.

  • Maximum No. of Attempts to Run

    • Integer Field Type

    • Size 4

    • Specifies how many times a job queue job should be rerun if an error occurs. This is useful in a situation in which the job is not responding. For example, a task is not responding because it depends on an external resource that is unavailable.

  • No. of Attempts to Run

    • Integer Field Type

    • Size 4

    • Specifies how many seconds the system will wait before restarting this job queue job in the event of a failure.

  • Last Ready State

    • Specifies the date and time when the job queue item was last set to ready and sent to the job queue.

  • Earliest Start Date/Time

    • Datatime Field Type

    • The value in the field shows the time of the next time the job will run. There are several factors that can affect whether a job queue item actually runs at any given time. The most common factors are the number of job queue items in the environment and the total number of scheduled jobs. There are operating limits to protect power levels. If you have a large number of items in your queue and, for example, one of them fails, or the items take longer than expected, the next job may not run at the expected time. If you have units of code that generate 100,000 or more scheduled tasks, you should investigate whether you really need all of those tasks. A list of all scheduled tasks is available on the Scheduled tasks page.

  • Expiration Date/Time

    • Datatime Field Type

    • Specifies the expiration date and time of the job queue item, after which the job queue item will not run. The date and time format must be month/day/year hour: minute 3/10/2021 12:00 PM.

  • Job Timeout

    • Specifies the maximum amount of time that a job queue item can run

  • Status

    • Specifies the status of a job series item. When you create a series of jobs, the status is set to On Hold. You can set the status to Ready or back to On Hold. Otherwise, the status in this field is updated automatically

    • States:

      • On Hold

        • The default state of the job queue item when it is created.

        • Choose the Set Status to Ready action, and change the status to Ready.

        • Select the Set On Hold action to return the status to Blocked.

      • Ready

        • The job queue entry is ready to run.

      • In Process

        • Job queue entry is in progress. This field is updated when the job queue is running.

      • Error

        • Something went wrong. Choose View Error to display the error message

    • Finished

      • The job queue entry is completed successfully.

    • On hold with inactivity Timeout

    • Upon successful completion, the job is removed from the list of job queue items, unless it is a recurring job. If it's a recurring task, the Date and time of the first start is adjusted to show the next expected execution of the job

    • The Blocked due to Inactivity status is used primarily for job queue items that schedule synchronization between Business Central and another application, such as Dataverse. If the value in this field is not zero and the job queue did not find any changes during the last run, Business Central suspends the job queue item.

    • When this happens, the Job Queue Status field displays a status of "Blocked due to Inactivity", and Business Central waits for the amount of time specified in the Idle Timeout field before rerunning the job queue item.

For example:

For example, by default, a CURRENCY job queue entry that synchronizes currencies in Dataverse with exchange rates in Business Central will look for changes in exchange rates every 30 minutes. If no changes are found, Business Central suspends the job queue item.

Note: Business Central automatically activates job queue items that are paused only when changes occur in Business Central. Changes in Dataverse don't trigger job queue items.

CURRENCY for 720 minutes (twelve hours). If the exchange rate changes in Business Central while a job queue item is paused, Business Central automatically reactivates the job queue item and restarts the job queue.

Report Parameters Tab

  • Report Dialog Parameters (Report Request Page Options)

    • Specifies whether the options in the parameters dialog box are set for the job. If the check box is selected, then the options have been selected for the layout of the job.

  • Report Output Type

    • Specifies the output of the scheduled report

  • Printer Name

    • Specifies the printer to use to print the scheduled report

Period (Recurrence) Tab

  • Recurring Job

    • Specifies whether the job queue item is periodic. If the Periodic Task field is selected, then the job queue item is repeated. If the field is not selected, then the job queue item is not repeated. After you specify that a job queue item is recurring, you must specify which days of the week the job queue item runs. Optionally, you can also specify the time of day to run the job and specify the number of minutes between runs

  • Run on Mondays

    • Specifies that the job queue item runs every Monday

  • Run on Tuesdays

    • Specifies that the job queue item runs every Tuesday.

  • Run on Wednesdays

    • Specifies that the job queue item runs every Wednesday

  • Run on Thursdays

    • Specifies that the job queue item runs every Thursday

  • Run on Fridays

    • Specifies that the job queue item runs every Friday

  • Run on Saturdays

    • Specifies that the job queue item runs on Saturdays

  • Run on Sundays

    • Specifies that the job queue item runs every Sunday

  • Next Run Date Formula

    • Specifies the date formula that will be used to calculate the next run of a recurring job queue item. If you use a date formula, all other recurrence settings will be cleared

  • Starting Time

    • Specifies when the job queue will start first.

  • Ending Time

    • Specifies the latest time of day that the periodic job queue item should be run

  • No. of Minutes between Runs

    • Specifies the minimum number of minutes to elapse between the execution of job queue items. The value cannot be less than one minute. This field is relevant only if the job queue item is set up as a recurring job. If you don't use the number of minutes between each run, the date formula setting is cleared.

  • Inactivity Timeout Period

    • Specifies the number of minutes that elapse before a periodic task that has a status of On Hold with an idle timeout is automatically restarted. The value cannot be less than five minutes.