Skip to content

Scheduled job handler (ScheduledJobHandler)

Type Scope Severity Activated
by default
Minutes
to fix
Tags
Error BSL Critical Yes 5 error

Description

Certain requirements are imposed on the methods of scheduled job handlers. Any export procedure or function of a non-global common server module can be used as a scheduled job method. If the scheduled job method is a function, then its return value is ignored.

If the scheduled job is predefined, then its handler should not have parameters. Otherwise, the parameters of such a scheduled job can be any values ​​that are allowed to be sent to the server. The parameters of a scheduled job must exactly match the parameters of the procedure or function it calls.

Diagnostics checks the following signs of the correctness of the scheduled job handler method: - there is a common module and a shared module method specified as a handler - common module is server - the method is export - the method has no parameters if the scheduled job is predefined - method body is not empty - there are no other scheduled jobs that refer to the same handler method

Examples

Sources

Snippets

Diagnostic ignorance in code

// BSLLS:ScheduledJobHandler-off
// BSLLS:ScheduledJobHandler-on

Parameter for config

"ScheduledJobHandler": false