0

A scheduled rule was triggered. Is it possible to change a date of the scheduled action? (programmatically or not) For example, the scheduled action will be triggered in 3 days but then you would like to change it for 1 day.

1 Answer 1

1

Yes, the timestamp of when the task is to be scheduled is stored in rules_scheduler db table, in date field. You can run a query like:

db_update('rules_scheduler')
  ->expression('date', 'date + 86400') // 86400 = 24 * 60 * 60
  ->condition('tid', $your_task_id)
  ->execute();
2
  • I have a question. Is $your_task_id equal to tid in this case? Commented Nov 11, 2014 at 8:30
  • Yes, this query will update the task which has tid equal to $your_task_id Commented Nov 11, 2014 at 13:03

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.