Daily processing at scheduled time

Giganews Newsgroups
Subject: Daily processing at scheduled time
Posted by:  Alan Tse (alan_NO_SPAM_plt…@yahoo.com.au)
Date: Sun, 14 Aug 2011

I have set up a cutoff time in the day to process the current day or
previous day's order, store in ini file. By running a timer.
This is so far so good:
eg. cutoff time 23:30

case 1: current time is 02:00 Monday
if current time < 23:30 then
  process previous day order (Sunday)

case 2 current time is 23:45 Monday
if current time > 23:30 then
  process today order (Monday)

case 3 current time is 02:00 Tuesday
if current time < 23:30 then
  process previous day order (Monday)

So this will work to process the end of day orders.

However, if I set the cutoff time at 04:00, the above conditions don't work.
Any idea to make it work?

Replies