Last updated October 4, 2009. Created on October 4, 2009.
Edited by BassPlaya. Log in to edit this page.

Ok so we know how to schedule something to be published but this is also possible to unpublish a node. I've done a very similar thing like the tutorial 2 to set an unpublish time once a node has been created. But how can you affect that scheduling time after the creation of the node and before the actual rule has operated? Let's say someone wants to extend the time a node is published or someone wants to prematurely unpublish a node manually. What should happen then and how to set it?

Here's how to:
You have to create new triggered rules.
1) to reset the scheduling time of an existing node when the node has been updated intendedly.

rule event: ON event After updating existing content
condition 1: content has type
AND
condition 2: (optionally) field has changed
action: select the option under the Rule Scheduler.

Optional condition: Change something like a date field (CCK Date field) of the initial posting, in my case that was: "Updated content's field 'field_date_posted' has been changed" This allows the scheduling time only to be affected when that date field has been modified. This means when a user intendedly wants to reset that scheduling time, any change in other fields won't affect this scheduling time.

Action: In my case that was: "Schedule unpublish content after 1 day" (this is the rule set which has the actual action of "unpublish content"). This will reset the scheduling time of that node back to 24 hours.

2) to delete the scheduling time of an existing node when it's unpublished manually.

rule event: ON event After updating existing content
condition 1: content has type
AND
condition 2: content is published
action: delete scheduled rule sets

Condition 2: Here you need to tick the "Negate" box. It will say "AND NOT updated content is published" meaning content is unpublished which is basically the result of the update of the existing content because it says "After updating.."

Action: This only deletes the rule sets for this particular node.

I was using:
D6.14
Rules 6.x-1.1
Rules Scheduler 6.x-1.1
Rules Administration UI 6.x-1.1

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.