/dev/null', $output); $tasks = []; $pendingComments = []; foreach ($output as $line) { $trim = trim($line); if ($trim === '') continue; if (strpos($trim, '#') === 0) { $pendingComments[] = ltrim($trim, '# '); continue; } // Ignora env vars (ex: MAILTO=) if (preg_match('/^[A-Z0-9_]+=/', $trim)) continue; $task = new CrontabTask($trim, $pendingComments); $tasks[] = $task; $pendingComments = []; } return $tasks; } }