@@ -248,7 +248,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
248
248
* @return void
249
249
* @throws \Exception
250
250
*/
251
- protected function runJob ($ scheduledTime , $ currentTime , $ jobConfig , $ schedule , $ groupId )
251
+ public function runJob ($ scheduledTime , $ currentTime , $ jobConfig , $ schedule , $ groupId )
252
252
{
253
253
$ scheduleLifetime = (int )$ this ->scopeConfig ->getValue (
254
254
'system/cron/ ' . $ groupId . '/ ' . self ::XML_PATH_SCHEDULE_LIFETIME ,
@@ -293,7 +293,7 @@ protected function runJob($scheduledTime, $currentTime, $jobConfig, $schedule, $
293
293
*
294
294
* @return \Magento\Cron\Model\ResourceModel\Schedule\Collection
295
295
*/
296
- protected function getPendingSchedules ()
296
+ public function getPendingSchedules ()
297
297
{
298
298
if (!$ this ->pendingSchedules ) {
299
299
$ this ->pendingSchedules = $ this ->scheduleFactory ->create ()->getCollection ()->addFieldToFilter (
@@ -310,7 +310,7 @@ protected function getPendingSchedules()
310
310
* @param string $groupId
311
311
* @return $this
312
312
*/
313
- protected function generate ($ groupId )
313
+ public function generate ($ groupId )
314
314
{
315
315
/**
316
316
* check if schedule generation is needed
@@ -359,7 +359,7 @@ protected function generate($groupId)
359
359
* @param string $groupId
360
360
* @return $this
361
361
*/
362
- protected function generateJobs ($ jobs , $ exists , $ groupId )
362
+ public function generateJobs ($ jobs , $ exists , $ groupId )
363
363
{
364
364
foreach ($ jobs as $ jobCode => $ jobConfig ) {
365
365
$ cronExpression = null ;
@@ -389,7 +389,7 @@ protected function generateJobs($jobs, $exists, $groupId)
389
389
* @param string $groupId
390
390
* @return $this
391
391
*/
392
- protected function cleanup ($ groupId )
392
+ public function cleanup ($ groupId )
393
393
{
394
394
// check if history cleanup is needed
395
395
$ lastCleanup = (int )$ this ->cache ->load (self ::CACHE_KEY_LAST_HISTORY_CLEANUP_AT . $ groupId );
@@ -455,7 +455,7 @@ protected function cleanup($groupId)
455
455
* @param array $jobConfig
456
456
* @return mixed
457
457
*/
458
- protected function getConfigSchedule ($ jobConfig )
458
+ public function getConfigSchedule ($ jobConfig )
459
459
{
460
460
$ cronExpr = $ this ->scopeConfig ->getValue (
461
461
$ jobConfig ['config_path ' ],
@@ -472,7 +472,7 @@ protected function getConfigSchedule($jobConfig)
472
472
* @param array $exists
473
473
* @return void
474
474
*/
475
- protected function saveSchedule ($ jobCode , $ cronExpression , $ timeInterval , $ exists )
475
+ public function saveSchedule ($ jobCode , $ cronExpression , $ timeInterval , $ exists )
476
476
{
477
477
$ currentTime = $ this ->timezone ->scopeTimeStamp ();
478
478
$ timeAhead = $ currentTime + $ timeInterval ;
@@ -496,7 +496,7 @@ protected function saveSchedule($jobCode, $cronExpression, $timeInterval, $exist
496
496
* @param int $time
497
497
* @return Schedule
498
498
*/
499
- protected function generateSchedule ($ jobCode , $ cronExpression , $ time )
499
+ public function generateSchedule ($ jobCode , $ cronExpression , $ time )
500
500
{
501
501
$ schedule = $ this ->scheduleFactory ->create ()
502
502
->setCronExpr ($ cronExpression )
@@ -512,7 +512,7 @@ protected function generateSchedule($jobCode, $cronExpression, $time)
512
512
* @param string $groupId
513
513
* @return int
514
514
*/
515
- protected function getScheduleTimeInterval ($ groupId )
515
+ public function getScheduleTimeInterval ($ groupId )
516
516
{
517
517
$ scheduleAheadFor = (int )$ this ->scopeConfig ->getValue (
518
518
'system/cron/ ' . $ groupId . '/ ' . self ::XML_PATH_SCHEDULE_AHEAD_FOR ,
0 commit comments