Created
April 7, 2010 14:23
-
-
Save perlDreamer/358934 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/WebGUI/Operation/Cron.pm b/lib/WebGUI/Operation/Cron.pm | |
index 7dff131..fdb8617 100644 | |
--- a/lib/WebGUI/Operation/Cron.pm | |
+++ b/lib/WebGUI/Operation/Cron.pm | |
@@ -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"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment