hi,

i tried to extend this tutorial with the scheduled unpublishing of a node, but it doesn't work. I simply followed the steps in the turorial twice, with some modifications in the second one which is for unpublishing.
The only differences in the setup for unpublishing are the identifiers of course and the scheduled evaluation date in the triggered rule which says: [node:field_publish_date-to-datetime] for the unpublishing procedure.

So both triggered rules are triggered by "After saving new content". By the condition of having a certain content-type. Both schedules do show up under admin/rules/rule_sets/scheduling but only the publishing schedule is being executed.

Any ideas why this couldn't work?

Thanks in advance,
skobe

Comments

Hardrocker’s picture

Hi Skobe,
The same way you created a rule for publishing the content its the same way for unpublishing it. Just create another CCK date field for unpublishing and set the value of that field in the "schedule evaluation time" of your unpublishing rule

skobe’s picture

Hi Hardrocker,

thank you so much for your fast reply. yesterday i ran through the hole procedure again(!) and found the problem. It has to be [node:field_publish_date-value] for the scheduled evaluation date. Else rules picks the wrong timezone (in my case).

Actually it works with just one datefield, cause it provides a 'from' and a 'to' date. For unpublishing i used [node:field_publish_date-to-value] (as it's adviced in the comments under the earlier mentioned tutorial).

I did go the same way for publishing as for unpublishing (that's what i ment with "twice" :) once for publishing and once for unpublishing. [not a native speaker/writer ^^ so sorry if i build a little difficult phrases]

Thanks a lot though, and have a good day!

Hardrocker’s picture

Hi Skobe,
Another trick I picked up from another post was use the [node:field_publish_date-datetime] and use a + or - value with the difference in time. So for a time that shows publishing 4 hours later do something like this [node:field_publish_date-datetime] -4 hours. I still have to try the [node:field_publish_date-value] token, since i have read in another post that it gives the same results as [node:field_publish_date-datetime].

Regards

skobe’s picture

Hi,

qiqiy, this is all about rules ^^ but thanks for participating.

Thanks hardrocker, read about that too. Also a good idea. Yes, it has the same results, because it just inserts the value of the field which itself is a date. For my purposes it's better i think, cause i don't need to provide other timezones. That's also why i didn't go deeper in the timezone stuff.. so maybe it's wrong but i think the 'datetime'-solution is more flexible in terms of timezones.

Here is onemore result of my research: http://nodeone.se/blogg/learn-rules-with-nodeone-part-1-overview
Great walkthrough for the rules module!

And a quote from the turorial: "Note: Rules Scheduler saves dates in GMT/UTC internally, but displays them in your timezone setting in the scheduling list. So be aware that the content of the date field is interpreted as UTC/GMT." i guess that was the problem all the time, but i didn't really attached importance to it.. gotta blame mayself here i suppose :D

greetings

mstornelli’s picture

Title: How to schedule publishing and unpublishing of a node » Schedule publishing and unpublishing of a node is missing
Project: Rules » Scheduler
Version: 6.x-1.4 » 7.x-1.x-dev
Component: Scheduler » User interface

Hi, please help me. My scheduler module is not running after installed, on node page the publishing and unpublishing parameter are missing. But the title is displayed.
I've openpublic beta3 with D7.8 core.
I try installed from sites/all/modules and profiles/openpublic/contrib and the problem is the same

thanks,
Stornelli

jonathan1055’s picture

Hi Stornelli,
If this is a problem with the scheduler module http://drupal.org/project/scheduler then I'm not sure why you have used this Rules issue thread and changed the project to Scheduler?

If you really do have a problem with Scheduler module then please start a new issue on the Scheduler page and revert this issue back to Rules.

Jonathan

jonathan1055’s picture

Project: Scheduler » Rules
Component: User interface » Scheduler

Moving this issue back to Rules, as I think it came to the Scheduler project by mistake.

Just for your interest, we do now have integration with rules - see #773510: Integration with Rules module We provide components to allow rules to set the Scheduler's publish_on and unpublish_on dates. Rules is very powerful, and the two projects work very well together.

Jonathan (Scheduler support)

paean99’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)