+ Reply to Thread
Results 1 to 2 of 2

Thread: sending message at specific time in a day.

  1. #1
    Senior Member
    Join Date
    May 2011
    Thanked 0 Times in 0 Posts

    sending message at specific time in a day.

    Is there a way by which I can send a message (sendGlobalPluginMessage?) to all the clients at a specific time through electroserver.. lets say for example at noon every day?

  2. #2
    Former Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Thanked 1,178 Times in 1,165 Posts
    Yes. In a server level component of some kind, you set up a scheduled execution that calls a method that sends the message. See the PluginScheduledExecution for an example of a scheduled execution.

    When ES5 first starts, you will need to use the Java Calendar class to determine the current time, calculate the number of milliseconds until the first time you want to send the message, have have a one-time scheduled execution that inits your main repeating scheduled execution.

    Ask questions if that isn't making sense. It's clear in my own head, but I'm not sure how well I explained it.
    Teresa Carrigan
    Senior Software Developer
    Janus Research Group, Inc.
    Senior Engineer
    Electrotank, Inc.

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts