Make sure that we can start a workflow via a cron job. Fixes bugs #11444 and #10189

This commit is contained in:
Colin Kuskie 2010-04-19 08:14:21 -07:00
parent 55d2e510d6
commit ea5e82b626
2 changed files with 9 additions and 3 deletions

View file

@ -306,9 +306,13 @@ sub www_runCronJob {
}
# Run the instance
$instance->start( 1 );
$task->delete( 1 ) if ( $task->get("runOnce") );
return "done";
my $error = $instance->start( 1 );
if ($error) {
$task->delete(1);
return "error";
}
$task->delete( 1 ) if ( $task->get("runOnce") );
return "done";
}
$session->errorHandler->warn("No task ID passed to cron job runner.");
return "error";