sigmavilla.blogg.se

Drupal rules scheduler email per x comments
Drupal rules scheduler email per x comments







On event after saving new content (this event automatically gives you the node ID of the content just saved) In my setup - my triggered rule (called special offer publish and unpublish) you need to tell the system when the rule_set should be scheduled (in your triggered rule configuration). I'm not familiar with scheduler module - but basically you need to grab the evaluation date from somewhere - i.e. The configuration page for the action should have the option to enter a date and time for when the rule should be evaluated. When you set up a triggered rule whose action is to "schedule rule_set daily deal" SOunds like you are trying to do something very simillar (except adding to a nodequeue instead of publish/unpublish) The re-scheduling of the rule will not work properly from within the rule set if the ruleset uses a node ID - it would just keep adding the same node back to the nodequee which is not what you want. Perhaps is you read the walkthrough example I wrote up it would help? My rules will 1)unpublish the node is the offer start date is in the futureĢ)schedule the node to be published when the start date arrives (thorough a cron run)ģ)schedule the node to be unpublished when the offer end date arrivesĤ)update publish and unpublish dates when content is changedĥ)set a form error when specials offers are being created so that offers that end in the past cannot be created (no offers requiring time machines) I have a similar set-up on one of my sites - content writers can create a "special offer" - this offer type has a cck field of type date that gives the offer start and end dates. do you have a triggered rule (say on event new content has been saved - and content has type "daily deal" -> do schedule "Daily Deal" I imported your rule - everything looks fine except - where is the node id being provided from?Ī rule that has an argument needs that argument to be provided from somewhere. Existing tasks for this rule set with the same identifier will be replaced.', 'description' => 'User provided string to identify the task. '#name' => 'rules_core_nodequeue_add_action', '#name' => 'rules_condition_content_is_published', '#name' => 'rules_condition_content_is_type', If +1 day does not work you could enter a php argument you should just be able to change the time portion to 00:01:00 (1 minute after midnight) and the date to the next day. the form should auto-populate with a time formatted according to your default date format settings. I select my ruleset and schedule it to run at midnight. Now to get the whole thing going I go to admin/rules/rule_sets/scheduling and under the "manually schedule rules without arguments" Great - this means my rule will add the nodequeues and then re-schedule itslef to do the same thing again a day later.

drupal rules scheduler email per x comments

I would then define a second action called schedule nodequeue add - in the Scheduled Evaluation Date type in +1 day and make sure the weight of this action is set to a higher number than the nodeque add action so that it fires second. How I would accomplish this task is as follows: I would use just 1 rule /In the rule I would put the first action to be the nodeque add action.

  • the "author" will receive another eMail, on the updated weaning date (if that is not what you want, then add a rules condition in Step 3 to verify that the editor's userid matches the author's userid).As far as the time format in the scheduling rule you should just be able to type "+1day".
  • no eMail will be send on the previously requested "weaning date" (if that is not what you want, then remove the schedule_delete part in the rules action in Step 3).
  • The schedule_delete that is part of this rule is to ensure that previously "scheduled" reminders will get removed when updating the data field (so that it only triggers 1 reminder, and with the most recently entered date).Īttention: as per your specs in your question, if anybody different from the "author" ever updates that weaning date, the effect of doing so will be that: The above rule refers to the Rules Component from the previous step. "component" : "rules_send_email_notification", Here is the Rules Component to be created, in Rules export format (just import it in your own environment via copy-paste): ,

    drupal rules scheduler email per x comments

    Step 1: Create a field to store the "weaning" dateĪssume your weaning date field has a machine name (say) field_weaning_date, for which only 1 date is allowed. Use the Rules module together with Rules Scheduler (a sub-module of it) for sending such eMails, as explained in the steps below.









    Drupal rules scheduler email per x comments