473,396 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

the best way to do that, resuming thread after conisderable amount of time

LP
Hi,
I developed a console application that is currently in production. It is
scheduled to run every morning (very early morning), to move files from one
server to another, update SQL db and then ftp files to a remote server.
Everything is great, but remote ftp server people, want to begin excepting
files after 9am our time, when this console app begins to run like at 3am. I
can't reschedule the app, because data needs to be in SQL before office
hours (way before 9am) I don't want to write or schedule another app either
just to ftp files . Thus the dilemma.
I am thinking suspending the thread and resuming it hours later to finish
ftp files. I have a feeling that it's a bad idea, but I can't say exactly
way. What's the best way of handling it?
Nov 16 '05 #1
1 994
LP <lp@a.com> wrote:
I developed a console application that is currently in production. It is
scheduled to run every morning (very early morning), to move files from one
server to another, update SQL db and then ftp files to a remote server.
Everything is great, but remote ftp server people, want to begin excepting
files after 9am our time, when this console app begins to run like at 3am. I
can't reschedule the app, because data needs to be in SQL before office
hours (way before 9am) I don't want to write or schedule another app either
just to ftp files . Thus the dilemma.
I am thinking suspending the thread and resuming it hours later to finish
ftp files. I have a feeling that it's a bad idea, but I can't say exactly
way. What's the best way of handling it?


Call Thread.Sleep? You might want to call it repeatedly, pausing for
five minutes at a time and checking whether or not it's time to do the
FTP part. That way you'll notice if the clock changes.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Chris Mullins | last post by:
I'm building a GUI that needs to be able to view a large amount of text arranged in rows. Large being anywhere from a few hundred lines through a few hundred thousand. I need a way to "cap" the max...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
5
by: Michel | last post by:
Hi there, What is the best way to serialize unknown data? I have a class that contains a list of parameter objects. The parameter has a value which can be a simple value of a complex class,...
2
by: SpookyET | last post by:
How do you pause and resume some work without using Thread.Suspend and Thread.Resume since they are deprecated in .NET 2.0?
5
by: Søren Reinke | last post by:
Hi there I am working on a program where the user should be able to import some CSV files. With my set of test data, it takes about 2 minutes to import, while it is importing the program sort...
4
by: Brian Cryer | last post by:
I'm developing a website which at one point has a hefty amount of data processing to do. I delegate this to a separate thread and on the results page do an auto-refresh every few seconds until the...
1
by: Ken Allen | last post by:
I am developing a small utility program that must perform a considerable amount of 'background' or 'research' work before it can display any user interface. In general it can take 3-15 seconds to...
1
by: Tom | last post by:
I have an MDI application in VB.NET. The main MDI window has a status bar, and menu bar. Child MDI windows are opened via the menu on the main MDI window. Now, what I want to do is add code to...
12
by: David | last post by:
Below are three classes for a console application. If put into three separate files, the sub main() will launch multiple threads adding and removing the same value. At the end we expect the value...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.