2

I have created a form which contains a CCK field "send sms" (checkbox) with two options:

  1. Send sms between 9am to 10am (= option 1)

  2. Or anytime (= option 2)

If the user selects option 1, then notification should send between time 9am to 10am to user.

If the user selects option 2, then notification should send at any time.

How to achieve this functionality?

  • 1
    This can be achieved with Rules and Components to schedule as per the users input by selecting the value of send sms. – Kalpan Feb 11 '16 at 6:36
  • Most drupal installations are using cgi to run php. Which is single threaded. That means the only way for drupal to send this message is if a call to the server is made in that time. You should schedule a cron job to make sure the server is run during the desired time. – Eyal Feb 11 '16 at 7:34
  • need to enable the rules scheduler module. – No Sssweat Feb 11 '16 at 10:30
2

Part 1: Rules

Have a look at my answer to "Rule to store user's last post date and scheduled rule based 30 day reminder", a question that is a variation of part of your question. It explains how you can use the Rules module for this (using the Rules Scheduler also).

Part 2: Message Stack

Have a look at the Message Stack, these are the basic components and dependencies of it:

enter image description here

Some more details about the Message-related modules (=quotes are from the module's project page):

  • Message:

    The Message module is the core of the message stack. It enables logging and displaying system events in a number of different use cases. Events that are recorded over time are sometimes call activity streams. Exportable messages subtypes can be created for different use cases with custom fields and display (view) modes.

  • Message Notify.

    This module provides a method for sending a message via a notifier plugin. Message Notify comes with plugins for email and SMS and may be extended to other transport mechanisms as required.

  • Message Subscribe.

    With this module, users who subscribe to content will be notified when events occur that involve that content. The module leverages the Flag module, which provides a subscribe functionality to users.

Quite a few popular Drupal distributions already adopted to this Message Stack, Open Atrium is one of them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy