Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Task scheduling reliability

19 views
Skip to first unread message

BeeJ

unread,
Mar 25, 2013, 2:31:39 PM3/25/13
to
I am going to write an app to perform a task to copy files at around
let's say 2AM (some preset fixed trigger time).

I do not want to use task scheduler since it requires using task
scheduler.

So the question of Windows time etc comes into question.
i.e. is there one best way to see if it is time to do something?
I know there are lots of ways to do it (just look at Time, look at
Internet time, start and do the task based on elapsed time, compare
Internet time to Windows time) and I can code up many methods but was
wondering if there is a tried and true method recommended.

I will be copying one to four or so 10 GByte files.
After starting, at trigger time, looking for files in a specified
folder, copy files, verify files, delete source files, hibernate until
2AM the next day and look for files again.


ralph

unread,
Mar 25, 2013, 4:31:54 PM3/25/13
to
On Mon, 25 Mar 2013 11:31:39 -0700, BeeJ <nos...@spamnot.com> wrote:

>I am going to write an app to perform a task to copy files at around
>let's say 2AM (some preset fixed trigger time).
>
>I do not want to use task scheduler since it requires using task
>scheduler.
>
>So the question of Windows time etc comes into question.
>i.e. is there one best way to see if it is time to do something?
>I know there are lots of ways to do it (just look at Time, look at
>Internet time, start and do the task based on elapsed time, compare
>Internet time to Windows time) and I can code up many methods but was
>wondering if there is a tried and true method recommended.
>

Yes. Use the Task Scheduler.

-ralph

MikeB

unread,
Mar 25, 2013, 4:50:15 PM3/25/13
to

"ralph" <nt_con...@yahoo.com> wrote in message
news:cuc1l8pqn6c1m5d5j...@4ax.com...
Can't wait for the inevitable recreation of Outlook/Exchange in VB.....

> -ralph


RB Smissaert

unread,
Mar 25, 2013, 5:33:58 PM3/25/13
to
You need Eduardo A. Morcillo's tskschd.dll. With that all will be easy.

RBS


"BeeJ" <nos...@spamnot.com> wrote in message
news:kiq52e$j1l$1...@dont-email.me...

MikeD

unread,
Mar 25, 2013, 6:15:35 PM3/25/13
to


"ralph" <nt_con...@yahoo.com> wrote in message
news:cuc1l8pqn6c1m5d5j...@4ax.com...
But didn't you see that he doesn't want to use task scheduler because that
requires using task scheduler! :)

Mike


Phil Hunt

unread,
Mar 25, 2013, 8:52:58 PM3/25/13
to
You can use DOS AT command to do that too.


"BeeJ" <nos...@spamnot.com> wrote in message
news:kiq52e$j1l$1...@dont-email.me...

Norm Fowler

unread,
Mar 26, 2013, 3:22:59 AM3/26/13
to
Phil Hunt pretended :
It has already been done, very well by Karen Kenworthy, and you can
download the program or the source code here.

http://www.karenware.com/powertools/ptreplicator.asp

Norm


ObiWan

unread,
Mar 26, 2013, 9:57:50 AM3/26/13
to

> I will be copying one to four or so 10 GByte files.
> After starting, at trigger time, looking for files in a specified
> folder, copy files, verify files, delete source files, hibernate
> until 2AM the next day and look for files again.

whatever you do; configure your app to use a NAMED "semaphore" (object)
and to destroy it when it terminates (be it due to an error or due to a
regular termination); next add some code to the app startup to check if
such a semaphore exists (and, in this case, terminate right out); this
will avoid you a bunch of issues ... oh and DON'T use "semaphore files"
I wasn't referring to those (and using them you'll be calling for
trouble - mind me), rather to some kernel objects


Tony Toews

unread,
Mar 26, 2013, 2:47:40 PM3/26/13
to
On Mon, 25 Mar 2013 15:31:54 -0500, ralph <nt_con...@yahoo.com>
wrote:

>Yes. Use the Task Scheduler.

In Beej's defence the Task Scheduler has an obvious problem. If the
Task is somehow deleted it will never run. If you have your own
program running at all times, preferabley in the notification area of
the task bar, then the user can be confident the task is waiting to
execute. In addition the user can then easily find the program and
view the log, current status or whatever.

Tony

BeeJ

unread,
Mar 28, 2013, 4:45:01 PM3/28/13
to
Norm Fowler wrote :
Thanks. I have already written my app but may explore how she checks
for an event time. My app also optionally compresses and encrypts
files.


CoderX

unread,
Apr 1, 2013, 6:44:35 PM4/1/13
to
Than have the app check for the existance of the schedule ever day or so. I
guess I don't see the problem.

"Tony Toews" <tto...@telusplanet.net> wrote in message
news:95r3l89o8j4grh6q3...@4ax.com...

Tony Toews

unread,
Apr 2, 2013, 1:01:42 AM4/2/13
to
On Mon, 1 Apr 2013 18:44:35 -0400, "CoderX" <co...@x.com> wrote:

Then the exe always needs to be running or the user has to start it
every day. Might as well put it in the notification area of the task
bar and do the scheduling yourself.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

ObiWan

unread,
Apr 3, 2013, 4:10:52 AM4/3/13
to

> Then the exe always needs to be running or the user has to start it
> every day. Might as well put it in the notification area of the task
> bar and do the scheduling yourself.

in such a case, you'll probably need a service :) or either some
"splitted app", one half will run as a service and a second half as a
"user mode" app, the first will contain all the needed code, the second
just the user "interface" (or even just a tray icon) and will "talk" to
the first (e.g. using named pipes, sockets or whatever)


BeeJ

unread,
Apr 3, 2013, 7:01:03 PM4/3/13
to
After serious thinking ObiWan wrote :
Yes and as I said I already have the app running for some time already.

I was trying to get enlightenment on doing the time check and was
trying not to steer anyone but I am concerned about things like
midnight, leap year and daylight saving time changes when it comes to
determining/"watching for" a trigger time since I am not all that
familiar with Windows time.


CoderX

unread,
Apr 3, 2013, 11:58:29 PM4/3/13
to
Compare times/dates in Integers.

"BeeJ" <spa...@nospam.com> wrote in message
news:kjicb5$3tu$1...@speranza.aioe.org...

ralph

unread,
Apr 4, 2013, 12:57:20 AM4/4/13
to
From a practical point of view, there is no "universal" or "best rule"
for leap years or daylight savings time changes. They are both best
handled as independent Business Rules defined, and too often
capriciously, by each organization, enterprise, or even divisions
within an enterprise.

-ralph

Deanna Earley

unread,
Apr 4, 2013, 5:16:52 AM4/4/13
to
On 04/04/2013 00:01, BeeJ wrote:
> I am not all that familiar with Windows time.

Thankfully Windows time doesn't differ much from real time :)

--
Deanna Earley (dee.e...@icode.co.uk)
iCatcher Development Team
http://www.icode.co.uk/icatcher/

iCode Systems

(Replies direct to my email address will be ignored. Please reply to the
group.)

ralph

unread,
Apr 4, 2013, 8:42:44 AM4/4/13
to
On Thu, 04 Apr 2013 10:16:52 +0100, Deanna Earley
<dee.e...@icode.co.uk> wrote:

>On 04/04/2013 00:01, BeeJ wrote:
>> I am not all that familiar with Windows time.
>
>Thankfully Windows time doesn't differ much from real time :)

Except when one attempts to perform multiple tasks in real time.

However, the difference between real quick and real time is an issue
shared by all general operating systems. <g>

-ralph

ralph

unread,
Apr 4, 2013, 9:25:18 AM4/4/13
to
On Wed, 03 Apr 2013 16:01:03 -0700, BeeJ <spa...@nospam.com> wrote:

>
>I was trying to get enlightenment on doing the time check and was
>trying not to steer anyone but I am concerned about things like
>midnight, leap year and daylight saving time changes when it comes to
>determining/"watching for" a trigger time since I am not all that
>familiar with Windows time.
>

I just noticed that your original post included this ...

"I am going to write an app to perform a task to copy files at around
let's say 2AM (some preset fixed trigger time)."

There is one general BR you can definitely apply if Daylight Savings
Changes are a concern, and that is NEVER use *2AM* for anything
critical. <g>

-ralph

Tony Toews

unread,
Apr 7, 2013, 3:35:16 PM4/7/13
to
On Thu, 04 Apr 2013 08:25:18 -0500, ralph <nt_con...@yahoo.com>
Hehehe. Excellent point I hadn't thought of!

Tony
0 new messages