you can do using these module :
- Obviously, you may use reaction rules to react upon any event with custom conditions and actions.
- Allows functionality to be re-used via components (Drupal 6: Rule sets only).
- Flexible scheduling system that allows scheduling any component / action.
- Users can share their customizations by using the built-in import/export feature. For that the module also integrates with
- Modular input evaluation system - for example you can install the Token module and use it in every action.
- The module has been developed with site performance in mind, so it makes use of caching routines to speed up rule evaluation.
This module allows nodes to be published and unpublished on specified
Dates can be entered either as plain text or with calendar popups. To
use calendar popups you need to install the Date Popup module, which
is part of the Date module.
- Rules Scheduler needs components – you can only schedule prepared components
- Components can be scheduled as actions, for example from reaction rules
- The evaluation time for scheduled tasks is set with strtotime(), which means that you can use highly flexible expressions
- You can also use data selection, combined with offsets if you want to
- Every scheduled task should have a unique task ID, or it will replace existing tasks
- Scheduled tasks are displayed under the Schedule tab on the Rules admin pages
- You can delete tasks manually if you want to
- You can schedule tasks manually, without the need of reaction rules
- It is sometimes useful to execute rule components manually, to see that the scheduled tasks will work as expected
Method 2 :
Create a Rule send email after 2 weeks of user registration (you can set it according to your requirement its just idea only for help)
- Add a new component under the Components tab. The component plugin is
"Action set". Call it "Send email to User". Under settings, add a
variable "User", label "User", machine name "user", usage
"parameter". Save component.
- Add an action, "Send mail" under "System". Fill out the form
accordingly. Save the component.
- Add a new rule, under the Rules tab. Call it "Send email to new
user". Add an event:" After saving a new user account". Add an action
"Schedule component evaluation". In the form, select the component
"Send email to User". Specify your scheduled date, like "+2 weeks",
which means 2 weeks from creation of new user. Add an identifier
(this is useful as a pointer when you create the rule to delete the
scheduled email when the user logs in before the 2 weeks.) Something
like, "send email to new user [account:uid]" where [account:uid]
makes this identifier unique. Under User, write "account" as the Data
selector. This will pass in the user info to the component.
This will send the email after 2 weeks of user creation.
Now, you have to create a rule to delete the schedule when the user logs in before 2 weeks.
- add a new rule, "Delete new user reminder". Add event: "User has
logged in". Add action: "Delete scheduled task". Under component,
select "Send email to User". Under identifier, copy and paste the
identifier from the scheduled rule, "send email to new user
- Set the weight to -1. Or set it to run before the email is sent. I
can't recall why this is important. Look at the post above.