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

  • Home
  • SEARCH
  • 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 5992531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:32:42+00:00 2026-05-22T23:32:42+00:00

Greetings, I am developing a web app. One piece of it will allow users

  • 0

Greetings, I am developing a web app. One piece of it will allow users to schedule a “reminder” email to be sent to them at a particular time of day. What is the best way to accomplish this? Basically, all the solutions I’ve come up with operate on a “polling” pattern when what I want is an “interrupt” pattern.

Here are some possible solutions I’ve come up with:

  1. Have a cronjob fire every minute. The script that fires checks a database to see if there are any emails to send, if there are, it sends them, else it goes back to sleep. Drawback with this is that there is a bit of overhead incurred every minute. Also, this may not be a scalable system, especially when the number of users gets so large that it may take over a minute to send out all the emails.

  2. Same as #1, but job only fires every 15 minutes. This is a bit more manageable, but not perfect, as it restricts the users to reminders on the 15 minute marks, and it still incurs a bit of overhead when there are no emails to send. Not bad, but not perfect either.

  3. Have PHP exec() a bit of code that dynamically alters crontab or schedules an “at” job in the underlying linux. This would give me the flexibility and “interrupt” type model I so crave, but would open up a huge security hole in allowing PHP to exec() linux code. So, I’m going to go ahead and rule this one out.

So, anything better than what I’ve come up with? Perhaps a way to schedule email without using cron? I’m very curious to see what you guys have to say about this :).

  • 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. Editorial Team
    Editorial Team
    2026-05-22T23:32:43+00:00Added an answer on May 22, 2026 at 11:32 pm

    Use first variant.

    it may take over a minute to send out
    all the emails

    1. Check, if file_exists(‘mailing.q’); If still exists – terminate execution.
    2. Create file mailing.q
    3. send emails
    4. unlink(‘mailing.q’);

    And don’t think about overhead – not in this case.

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

Sidebar

Related Questions

Greetings, My app name(the one that appears on the home screen) contains a special
Greetings! Anyway, My question, If you want to experiment developing for a Windows Mobile
Greetings, I'm trying to find a way to 'unbind' a socket from a particular
Greetings, The VBA code below will create an Excel QueryTable object and display it
Greetings, currently I am refactoring one of my programs, and I found an interesting
Greetings! This is my first question. I've searched all over the web as well
Greetings. I'm looking for a way to parse a number of XML files in
Greetings! I'm working on wrapping my head around LINQ. If I had some XML
Greetings, I'm trying to find either a free .NET library or a command-line executable
Greetings, I need a way (either via C# or in a .bat file) to

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.