1

This question is a sequel on Why is the database not updated before a next Rule is launched?. I have a Rule that schedules a Rules component 5 seconds after the current time (this number is arbitrarily chosen). Since this component uses information from a frequently changing View, it should be executed as soon as possible. However, in my current configuration, that only happens when cron is run; which takes place once in an hour.

Can I somehow force a cron run (eventually with Rules) when the Rules component is scheduled?

6
  • The best I can think of for implementing a Rules Action to for cron to run, is to create your own custom Rules Action, in which you invoke drupal_cron_run Sep 14, 2016 at 9:59
  • @Pierre.Vriens: That sounds like a great idea to me if that is easier/better for performance than using another module like Elysia Cron or Ultimate Cron.
    – Jeroen
    Sep 14, 2016 at 10:02
  • Now you make me doubt if I should write that down as an actual answer ... Sep 14, 2016 at 10:10
  • @Pierre.Vriens: Haha, you are the expert here, so the decision is yours. I am new to cron and stuff, so I don't really know what the best practices are or what the drawbacks of a frequently running cron are.
    – Jeroen
    Sep 14, 2016 at 10:17
  • I'd be interested in an answer that doesn't involve a custom Rules Action, I can't imagine nobody ever had a similar requirement. Maybe somebody like @NiallMurphy might come up with an interesting solution ... Sep 14, 2016 at 10:30

1 Answer 1

0

you can give this module a try , it makes it possible to run cron via configurable rules Ultimate cron

1
  • 1
    I'd be interested how to "configure" those "rules", using this module, so that cron is triggered "when the Rules component is scheduled" (as in the question. Sep 14, 2016 at 9:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.