Out-of-the-box, Drupal comes with a cron-run-trigger, but no actions that can actually be fired by this trigger; I think an administrator should at least be able to have a site send him/her an email after a cron run (might even help troubleshooting cron problems).

Patch attached makes it possible to assign the "Send e-mail..."-action to the cron run trigger. This patch does require #246096: Cron triggers are not executed to land first, since cron run triggers are not fired correctly at the moment.

Comments

mr.baileys’s picture

Status: Active » Needs review
mr.baileys’s picture

Issue tags: +actions, +cron, +triggers

Status: Needs review » Needs work

The last submitted patch failed testing.

mr.baileys’s picture

Status: Needs work » Needs review

Possible testbot failure, requesting a re-test.

cburschka’s picture

Status: Needs review » Reviewed & tested by the community

Easy one-liner, this looks ready.

dries’s picture

Status: Reviewed & tested by the community » Fixed

I committed this but we'll need to finish #246096: Cron triggers are not executed still. Thanks!

andypost’s picture

Version: 7.x-dev » 6.x-dev
Status: Fixed » Needs review
StatusFileSize
new641 bytes

It's easy to backport

andypost’s picture

StatusFileSize
new719 bytes

Previous patch was not unified

andypost’s picture

andypost’s picture

gábor hojtsy’s picture

Version: 6.x-dev » 7.x-dev
Status: Needs review » Fixed

This is a feature request, and features only go to Drupal 7. Also, I doubt it makes much sense to send a stock email on each cron run. Usually, sites I've seen run their cron at least hourly, but more like 15-30 minutes.

Moving back to 7.x fixed.

andypost’s picture

@Gábor Hojtsy strange, suppose it's a bug - we have trigger but but we cant use it out of box....

So in someone need to send email on cron run should place this code in own module

function OWNMODULE_action_info_alter(&$actions) {
  $actions['system_send_email_action']['hooks']['cron'] = array('run');
}

Status: Fixed » Closed (fixed)
Issue tags: -Needs backport to D6, -Quick fix, -actions, -cron, -triggers

Automatically closed -- issue fixed for 2 weeks with no activity.