0

I'm creating rules for posting to twitter. However I need these rules to run every time cron runs. What is the best way to structure these rules so they send the appropriate post at the appropriate time?

1 Answer 1

2

Rules has a specific "React on event" under system -> "cron maintenance tasks performed". If your using the rules modules, that will trigger your rule on every cron run.

Also, if your building a custom module, and you need to call a function on every cron run, you can use hook_cron to add a function to the cron tasks as well.

3
  • Thanks, that helps start the rule, now how do I get it to choose a random piece of content based on certain conditions like the value of a taxonomy field?
    – CW Smith
    Mar 11, 2015 at 17:23
  • After you've created a rule, there should be a conditions area where you can add conditions that, if meet, will allow the action to be triggered.
    – Jance
    Mar 11, 2015 at 18:12
  • I see, cause I'm wanting that reaction to be if that fields equals a specific thing it would do something, but if it doesn't it would do another. an if rule.
    – CW Smith
    Mar 11, 2015 at 18:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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