procmail
[Top] [All Lists]

Re: running a recipe only during certain hours

1999-06-20 11:16:25
On 20 June 1999, David W. Tamkin <dattier(_at_)Mcs(_dot_)Net> wrote:
When Liviu Daia wrote,

| > |     ... Or you can do it the other way around: save messages to
| > | a folder, and have a cron job forward them to your phone.

One thing I pointed out is that,

| > 2. The routine to save the messages to a folder would still need
| > to know the time of day, because messages that arrive during work
| > hours would not need to be spooled for the cron job that sends
| > them to the pager.

Dr. Daia followed up,

|     No.  If the cron job is not scheduled to run during work hours,
| no messages would get sent to the phone during that period.

Let me try again.

But if the time of day is not checked on incoming messages, all
messages that arrive during work hours would be spooled for the paging
job, and when the workday ends and the cron job runs, ZC's friend
would get paged for all the email that had come in all day long, not
just for those that had come since the workday ended.

The pages wouldn't come during work hours, but they'd still come
(after work ends) for email that arrived while ZC's friend was at
work.

    True, but this is probably desirable.  IMO, the typical situation is
something along the lines of:

- the messages accumulate to a sort of spool folder;
- if ZC is at work, he checks the spool folder, and moves the messages
  he reads out of the way (that's where Maildir folders come to be
  convenient);
- if for some reasons he can't get to read his messages at work, or if
  some messages arrive between the moment he last checked the spool and
  the moment he goes home, he will get the messages later on the phone;
- the cron job would also move the messages out of the way.

    This is probably not as bad as it looks: the spool folder has to be
pretty low traffic anyway...

    Regards,

    Liviu Daia

-- 
Dr. Liviu Daia               e-mail:   Liviu(_dot_)Daia(_at_)imar(_dot_)ro
Institute of Mathematics     web page: http://www.imar.ro/~daia
of the Romanian Academy      PGP key:  http://www.imar.ro/~daia/daia.asc