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 6090391
In Process

The Archive Base Latest Questions

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

Ok, Here is the situation, I am looking for some general input on the

  • 0

Ok, Here is the situation, I am looking for some general input on the logic of this class. The purpose of this class is to: query a schedule database for employees that are currently working, and select the email address of one person who is currently working.

This class gets called by procmail every time an email is received, and serves procmail one email to forward to.

When there is more than one person working, the 2nd email received should go to the next person, the third email to the next, and loop over them as such – Delivering them equally.
If nobody is working at a specific time, the list of active workers is set to everybody working the next day, or the same day respectively.

I have this class half-made, and I’m having a hard time coming up with the logic of equal delivery. I figure I would log each email sent in a database table, limit it to about 10 entries and just email it to the person who shows up the least. However, this will not be exactly equal. Neither would just selecting a random email.

I’m not looking for someone to code this for me, just looking for some input on a better logic method; maybe someone has run into this kind of situation before?

The table design is extremely simple, it goes like:

date | name | email | time_in | time_out

Of course there are other tables that handle manual overrides, and the table I mentioned about logging sent emails. I can post the current class I have, but like I said it is half-made, and the class logic is pretty simple – other than this specific part.

Any Idea, or input is welcome!

  • 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-23T12:12:31+00:00Added an answer on May 23, 2026 at 12:12 pm

    How about — keep a counter of how many emails each person got, sort by least to determine who gets the next, then reset all the counters to zero at the start of each shift.

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

Sidebar

Related Questions

Here's the situation I'm in: We have a field in our database that contains
Admittedly, I am simply looking for some direction here. I have a specific situation,
Here's the situation - I've got a shell that loads an external .swf. Now,
Here's the situation: we have an Oracle database we need to connect to to
I am looking for a database that can I run SQL statements on without
Alright here's the situation, I have an application written in the Zend_Framework, that is
Again, I'm here looking for your wisdom, in this case, I need to learn
The situation is, that i need to create table in grid view looking like
I'm cleaning up some pretty complicated code that I didn't write and I'm looking
I've got the common situation where I've got user input that uses a subset

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.