Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MUlt1mate committed Jan 6, 2016
1 parent e2f62ae commit 8fdc194
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# PHP Cron tasks manager

The PHP cron tasks manager designed for MVC-type applications. It's used instead of standard linux *crontab* command.
This is a flexible tasks manager designed for MVC-type applications. It's used instead of standard linux *crontab* command.

The purpose of this tool is to provide an easy way to manipulate repetitive tasks.
9 changes: 6 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
{
"name": "mult1mate/crontab-manager",
"description": "Yet another crontab manager",
"name": "mult1mate/cron-manager",
"description": "Flexible cron tasks manager for MVC-type applications",
"minimum-stability": "stable",
"license": "proprietary",
"keywords": ["cron","crontab","task manager"],
"homepage": "https://cron.multimate.ru",
"license": "MIT",
"authors": [
{
"name": "MUlt1mate",
"email": "multimate.abs@gmail.com"
}
],
"require": {
"php": ">=5.4.0",
"mtdowling/cron-expression": "v1.0.4"
},
"autoload": {
Expand Down
4 changes: 2 additions & 2 deletions examples/active_record/views/report.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
<th>Error</th>
<th>All</th>
</tr>
<? foreach ($report as $r): ?>
<?php foreach ($report as $r): ?>
<tr>
<td><?= $r['command'] ?></td>
<td><?= $r['completed'] ?></td>
<td><?= $r['started'] ?></td>
<td><?= $r['error'] ?></td>
<th><?= $r['runs'] ?></th>
</tr>
<? endforeach; ?>
<?php endforeach; ?>
</table>
4 changes: 2 additions & 2 deletions examples/active_record/views/runs_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
<td><?= $r->execution_time ?></td>
<td><?= $r->ts->format('Y-m-d H:i:s') ?></td>
<td>
<? if (!empty($r->output)): ?>
<?php if (!empty($r->output)): ?>
<a href="<?= $r->task_run_id ?>" data-toggle="modal" data-target="#output_modal"
class="show_output">Show output</a>
<? endif; ?>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
Expand Down
8 changes: 4 additions & 4 deletions examples/active_record/views/task_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
<label for="method">Methods</label>
<select class="form-control" id="method">
<option></option>
<? foreach ($methods as $class => $class_methods): ?>
<?php foreach ($methods as $class => $class_methods): ?>
<optgroup label="<?= $class ?>">
<? foreach ($class_methods as $m): ?>
<?php foreach ($class_methods as $m): ?>
<option value="<?= $class . '::' . $m . '()' ?>"><?= $m ?></option>
<? endforeach; ?>
<?php endforeach; ?>
</optgroup>
<? endforeach; ?>
<?php endforeach; ?>
</select>
</div>
<div class="form-group">
Expand Down
8 changes: 4 additions & 4 deletions examples/active_record/views/tasks_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@
<label for="method">Methods</label>
<select class="form-control" id="method">
<option></option>
<? foreach ($methods as $class => $class_methods): ?>
<?php foreach ($methods as $class => $class_methods): ?>
<optgroup label="<?= $class ?>">
<? foreach ($class_methods as $m): ?>
<?php foreach ($class_methods as $m): ?>
<option value="<?= $class . '::' . $m . '()' ?>"><?= $m ?></option>
<? endforeach; ?>
<?php endforeach; ?>
</optgroup>
<? endforeach; ?>
<?php endforeach; ?>
</select>
</div>
<div class="form-group">
Expand Down
3 changes: 2 additions & 1 deletion src/TaskManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ public static function parseCrontab($cron, $task_class)
$comment = null;
$result = [];
foreach ($cron_array as $c) {
if (empty(trim($c)))
$c = trim($c);
if (empty($c))
continue;
$r = [];
$r[] = $c;
Expand Down

0 comments on commit 8fdc194

Please sign in to comment.