Project

General

Profile

Actions

Bug #25645

closed

tx_scheduler_CronCmd does not correctly parse step values

Added by Christian Kuhn almost 15 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Should have
Category:
scheduler
Target version:
-
Start date:
2010-01-10
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Problem:
Step values of cron command are not always calculated correctly in getList():
  • * */14 * * should result in days 14,28
  • * 2,4-5,*/14 * * should result in days 2,4,5,14,28
/**
 * Tests whether dayList is correctly calculated for stops of month days
 *
 * @test
/
public function isDayListCorrectForStepsOfDayOfMonth() {
$cronCmdInstance = t3lib_div::makeInstance('tx_scheduler_cronCmd', '
* */14 * *');
$expectedResult = array(
'0' => 14,
'1' => 28,
);
$actualResult = $cronCmdInstance->valid_values;
$this->assertEquals($expectedResult, $actualResult[2]);
}
/**
 * Tests whether dayList is correctly calculated for stops of month days combined with ranges and lists
 *
 * @test
/
public function isDayListCorrectForStepsOfDayOfMonthCombinedWithLists() {
$cronCmdInstance = t3lib_div::makeInstance('tx_scheduler_cronCmd', '
* 2,4-5,*/14 * *');
$expectedResult = array(
'0' => 2,
'1' => 4,
'2' => 5,
'3' => 14,
'4' => 28,
);
$actualResult = $cronCmdInstance->valid_values;
$this->assertEquals($expectedResult, $actualResult[2]);
}

(issue imported from #M13194)

Actions #1

Updated by Christian Kuhn over 14 years ago

Committed _02 to trunk, rev. 7481
Committed _02_test to trunk, rev. 7482

Actions #2

Updated by Francois Suter over 12 years ago

  • Status changed from Resolved to Closed
Actions #3

Updated by Michael Stucki almost 11 years ago

  • Category set to scheduler
Actions #4

Updated by Michael Stucki almost 11 years ago

  • Project changed from 739 to TYPO3 Core
  • Category changed from scheduler to scheduler
  • Target version deleted (0)
Actions

Also available in: Atom PDF