Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 167717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:19:30+00:00 2026-05-11T12:19:30+00:00

I have an app that needs to fire off a couple of events at

  • 0

I have an app that needs to fire off a couple of events at certain times during the day – the times are all defined by the users. I can think of a couple of ways of doing it but none of them sit too well. The timing doesn’t have to be of a particularly high resolution – a minute or so each way is fine.

My ideas :

  1. When the app starts up read all the times and start timers off that will Tick at the appropriate time

  2. Start a timer off that’ll check every minute or so for ‘current events’

tia for any better solutions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T12:19:30+00:00Added an answer on May 11, 2026 at 12:19 pm
    • Store/index the events sorted by when they next need attention. This could be in memory or not according to how many there are, how often you make changes, etc. If all of your events fire once a day, this list is basically a circular buffer which only changes when users change their events.
    • Start a timer which will ‘tick’ at the time of the event at the head of the list. Round up to the next minute if you like.
    • When the timer fires, process all events which are now in the past [edit – and which haven’t already been processed], re-insert them into the list if necessary (i.e. if you don’t have the ‘circular buffer’ optimisation), and set a new timer.

    Obviously, when you change the set of events, or change the time for an existing event, then you may need to reset the timer to make it fire earlier. There’s usually no point resetting it to fire later – you may as well just let it go off and do nothing. And if you put an upper limit of one minute on how long the timer can run (or just have a 1 minute recurring timer), then you can get within 1-minute accuracy without ever resetting. This is basically your option 2.

    Arguably you should use an existing framework rather than rolling your own, but I don’t know C# so I have no idea what’s available. I’m generally a bit wary of the idea of setting squillions of timers, because some environments don’t support that (or don’t support it well). Hence this scheme, which requires only one. I don’t know whether C# has any problems in that respect, but this scheme can easily be arranged to use O(1) RAM if necessary, which can’t be beat.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 73k
  • Answers 73k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer The gravatar url looks like this: http://www.gravatar.com/avatar/<md5hashofemail> Here are the… May 11, 2026 at 2:00 pm
  • added an answer try using the landscape paper mode rather than portrait mode.… May 11, 2026 at 2:00 pm
  • added an answer Why not turn on error_reporting to get a more detailed… May 11, 2026 at 2:00 pm

Related Questions

I have an app that needs to open a new window (in the same
I have an app that needs to handle very large strings between a SQL
I have an app that needs to check a database table every minute. The
I have an app that, while running, needs to poll its own memory usage.
I have an app that executes commands on a Linux server via SSH just
I have an app which consists of several different assemblies, one of which holds
I have an NSWindow subclass (GameWindow) containing an NSOpenGLView subclass (GameView). The app is
Yes, there is a similar question here . However, that question doesn't seem to
I am working on a client proposal and they will need to upgrade their

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.