File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
system/src/Grav/Console/Cli Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 87
87
"ext-exif" : " Needed to use exif data from images."
88
88
},
89
89
"config" : {
90
- "apcu-autoloader" : true ,
91
- "platform" : {
92
- "php" : " 7.3.6"
93
- }
90
+ "apcu-autoloader" : true
94
91
},
95
92
"autoload" : {
96
93
"psr-4" : {
Original file line number Diff line number Diff line change @@ -57,8 +57,14 @@ protected function configure(): void
57
57
'Force run all jobs or a specific job if you specify a specific Job ID ' ,
58
58
false
59
59
)
60
+ ->addOption (
61
+ 'force ' ,
62
+ 'f ' ,
63
+ InputOption::VALUE_NONE ,
64
+ 'Force all due jobs to run regardless of their schedule '
65
+ )
60
66
->setDescription ('Run the Grav Scheduler. Best when integrated with system cron ' )
61
- ->setHelp ("Running without any options will force the Scheduler to run through it's jobs and process them " );
67
+ ->setHelp ("Running without any options will process the Scheduler jobs based on their cron schedule. Use --force to run all jobs immediately. " );
62
68
}
63
69
64
70
/**
@@ -84,6 +90,7 @@ protected function serve(): int
84
90
$ run = $ input ->getOption ('run ' );
85
91
$ showDetails = $ input ->getOption ('details ' );
86
92
$ showJobs = $ input ->getOption ('jobs ' );
93
+ $ forceRun = $ input ->getOption ('force ' );
87
94
88
95
// Handle running jobs first if -r flag is present
89
96
if ($ run !== false ) {
@@ -256,7 +263,7 @@ protected function serve(): int
256
263
}
257
264
} elseif (!$ showJobs && !$ showDetails && $ run === false ) {
258
265
// Run scheduler only if no other options were provided
259
- $ scheduler ->run (null , true );
266
+ $ scheduler ->run (null , $ forceRun );
260
267
261
268
if ($ input ->getOption ('verbose ' )) {
262
269
$ io ->title ('Running Scheduled Jobs ' );
You can’t perform that action at this time.
0 commit comments