When I add watchdog calls in a cron function, these are being over-riden by elysia's own watchdog message:
Unexpected termination of cron job excentriq_node_digest_daily manually started, aborted.
Is there a way around this or did I miss something? It also sets the cron job as having terminated unexpectedly which is not the desired behavior, I just want to pull out of cron function gracefully as there is nothing to process.
// Example snippet below
// No nodes to process, return and log to watchdog
if (!$result) {
watchdog("digest", "No digest.");
print_r("DONE!");
exit;
}
THe above code does not get through watchdog function, elysia reports Unexpected termination. print_r is not rendered but it is if placed before watchdog.
Comments
Comment #1
gotheric commentedA cron job should not "exit" like this. Try using a "return" instead of "exit" and see if it works (elysia_cron should have no problem with watchdog, there are a lot of cron jobs that uses watchdog normally).
You can execute a single job via interface (or via Drush, in new DEV branch), if you want to skip other cron jobs and run only yours.
Comment #2
Taxoman commentedComment #3
kala4ek