Skip to content

Commit e9ba7eb

Browse files
authored
Update CrontabManager.php
If crontab is already populated, 'php bin/magento cron:install' adds '#~ MAGENTO START' and the rest of code directly to the last row of crontab without any spaces.
1 parent 7621060 commit e9ba7eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/Magento/Framework/Crontab/CrontabManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function removeTasks()
114114
private function generateSection($content, $tasks = [])
115115
{
116116
if ($tasks) {
117-
$content .= self::TASKS_BLOCK_START . PHP_EOL;
117+
$content .= PHP_EOL . self::TASKS_BLOCK_START . PHP_EOL;
118118
foreach ($tasks as $task) {
119119
$content .= $task['expression'] . ' ' . PHP_BINARY . ' '. $task['command'] . PHP_EOL;
120120
}

0 commit comments

Comments
 (0)