2

I have a Triggered Rule that is fired on "Content is going to be saved". What it should do is look at the content type, and if that passes, delete any scheduled task based on that node ID, and schedule the "Publish Ruleset".

The "Publish Ruleset" then is fired, which calls a Schedule Expire Node rule, and Schedule Node Publish rule. The first one schedules another task based on an Expiration CCK Date field, the second publishes the node based on a Publish CCK Date field.

Anytime these rules are fired, any other scheduled tasks with the same node ID are deleted.

Some times nodes are published when they should be, some times they are not, and they don't seem to be unpublished with consistency either.

Is it too specific to have the CCK Date fields using time as well as date for the rule? Should it just be a date without specifying time?

I am having trouble figuring out if this is the correct way to automate the publishing and unpublishing of content with Rules.

I modelled the Rule after this tutorial:

http://drupal.org/node/520012

What I am seeing is sometimes the tasks are scheduled correctly, and the nodes in question are published (or unpublished). The queue never seems to clear itself though. Does Rules know that it can't publish something that is already published, or does it evaluate everything in the queue anyway?

Has anyone found a good way to handle this?

2
  • I am not die hard by Rules. I will check out Scheduler and see if that helps.
    – Kevin
    Apr 13, 2011 at 12:32
  • +10 for Scheduler. I've used it on almost every site I maintain, and it's already running well for D7. Jun 29, 2011 at 18:55

2 Answers 2

4

I've had a great experience using Scheduler to schedule publishing and unpublishing of nodes automatically.

Although this doesn't specifically answer your question because it doesnt involve rules, its worth mentioning :)

1

Even though this question is very old.. I wrote small step by step instructions to do this kind of functionality: http://drupal.org/node/520012#comment-7120890

Hope this helps someone.

Your Answer

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

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