Skip to content

Commit

Permalink
Add force and shutdownTimeout args to `SchedulerService#shutdownSched…
Browse files Browse the repository at this point in the history
…uler`
  • Loading branch information
elpete committed Feb 2, 2024
1 parent 69814c2 commit 63eae13
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions system/web/services/SchedulerService.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,17 @@ component extends="coldbox.system.web.services.BaseService" accessors="true" {
/**
* Restarts a scheduler from this manager, if it exists.
*
* @name The name of the scheduler
* @name The name of the scheduler
* @force If true, it forces all shutdowns this is usually true when doing reinits
* @timeout The timeout in seconds to wait for the shutdown of all tasks, defaults to the scheduler's shutdown timeout
*
* @return True if restarted, false if not found
*/
boolean function restartScheduler( required name ){
boolean function restartScheduler(
required name,
boolean force = false,
numeric timeout
){
if ( hasScheduler( arguments.name ) ) {
variables.schedulers[ arguments.name ].restart();
return true;
Expand Down

0 comments on commit 63eae13

Please sign in to comment.