Answers.Body: <p>Out of the box that is not possible with CiviRules. You need to write your own trigger which fires every month.</p>
  
  <p>The good news is that the SQLTasks extension might do this: <a href="https://civicrm.org/extensions/sql-tasks-extension-configurable-recurring-tasks" rel="nofollow noreferrer">https://civicrm.org/extensions/sql-tasks-extension-configurable-recurring-tasks</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-22T08:16:20.600Z
Answers.Text: Agree with @Jaap though I would like to add that CiviRules is an engine. And you can use the engine to do what you want if you are able to develop your own triggers, conditions and actions. Documentation is here: https://docs.civicrm.org/civirules/en/latest/
Answers.UserDisplayName: ErikH - CiviCooP
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-30T15:55:28.170Z
Answers.Text: ErikH, how would I go about developing my own trigger? I have read through the documentation, but still pretty much lost on how to add a new trigger to existing extension code. I feel that I need a new Cron Trigger, maybe similar to the "Daily Trigger for Group Membership", but runs every 30 days. I have a smart group created for all "Active memberships". I think I would just need a cron trigger to fire every 30 days and simply run an action to add a point to each member in this smart group. If a contact is removed from the group, his points will not update which is ok for now.
Answers.UserDisplayName: Sudesh
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-31T07:38:51.253Z
Answers.Text: Yes you can develop a cron trigger. The difficult part is to ensure it only runs every 30 days because the civicrm cron mechanism only allows for cron running daily, hourly or every time the cron runs.
Answers.UserDisplayName: Jaap Jansma - CiviCooP
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-22T08:10:20.060Z
Answers.LastActivityDate: 2018-05-22T08:10:20.060Z
Answers.UserDisplayName: Jaap Jansma - CiviCooP
Body: <p>We are running CiviCRM 4.7.12 on Wordpress. We have a number of donors who have an active membership. They contribute monthly towards the membership. We have CiviPoints and CiviRules installed. We want to use CiviRules for the following:</p>
  
  <ol>
  <li>Grant 1 point to a contact for each month that the contact remains an active member (the membership status must be either new or current). </li>
  <li>Deduct 2 points for each month that the contact remains inactive (due to cancellation or lapse in payment)</li>
  </ol>
  
  <p>How can we setup CiviRules to perform 1 and 2 above?</p>
  
Tags: <civirules><civipoints>
Title: CiviRules - Configuring a rule to grant a point for each month that a contact has an active membership
ThreadText: # CiviRules - Configuring a rule to grant a point for each month that a contact has an active membership
  
  (Asked by: username_0 on 2018-05-21)
  
  We are running CiviCRM 4.7.12 on Wordpress. We have a number of donors who have an active membership. They contribute monthly towards the membership. We have CiviPoints and CiviRules installed. We want to use CiviRules for the following:
  
  1. Grant 1 point to a contact for each month that the contact remains an active member (the membership status must be either new or current).
  2. Deduct 2 points for each month that the contact remains inactive (due to cancellation or lapse in payment)
  
  How can we setup CiviRules to perform 1 and 2 above?
  
  **Tags:** civirules, civipoints
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-05-22. Score: 1 | Accepted answer
  
  Out of the box that is not possible with CiviRules. You need to write your own trigger which fires every month.
  
  The good news is that the SQLTasks extension might do this: <https://civicrm.org/extensions/sql-tasks-extension-configurable-recurring-tasks>
  
  > **Comments:**
  > **username_2**: Agree with @Jaap though I would like to add that CiviRules is an engine. And you can use the engine to do what you want if you are able to develop your own triggers, conditions and actions. Documentation is here: https://docs.civicrm.org/civirules/en/latest/  
  > **username_0**: ErikH, how would I go about developing my own trigger? I have read through the documentation, but still pretty much lost on how to add a new trigger to existing extension code. I feel that I need a new Cron Trigger, maybe similar to the "Daily Trigger for Group Membership", but runs every 30 days. I have a smart group created for all "Active memberships". I think I would just need a cron trigger to fire every 30 days and simply run an action to add a point to each member in this smart group. If a contact is removed from the group, his points will not update which is ok for now.  
  > **username_1**: Yes you can develop a cron trigger. The difficult part is to ensure it only runs every 30 days because the civicrm cron mechanism only allows for cron running daily, hourly or every time the cron runs.  
  
  ---
  
  