Scheduled job: what program types will work

D

Dean Slindee

Need to write a standalone application that processes data once per day.
Looking for the application program types available that would satisfy these
requirements:
Requirements:
1. Unattended processing that looks for rows in tables in a SQL Server
database that is updated in batch once per day via another company's daily
process. The newly added rows are selected based on a process date
parameter (see #4).
2. Cleans and reformats the selected data rows, and then updates tables on
another SQL Server database.
3. Need to be able to run in a manual mode in case of rerun. User would
need to supply the process date parameter (any date).
4. The automated date parameter would be one day greater than the Max date
parameter found in a ProcessHistory table where one summary row would be
inserted by this process each day upon successful completion of this
process.

What program types might fit, and how would they work? Windows Service,
Batch file that launches an .exe, some combination, other ideas?

Thanks,
Dean Slindee
 
J

JB

Hi Dean,

I'm currently writing a similar type of application.
The solution I chose is in a nut shell:
- A windows Service that runs the scheduler and the DB Queries (SELECT
and INSERT)
- A Windows Form Client application to configure the various
parameters (e.g. scheduler frequency, Queries to run, etc), to start
the scheduler and to run Queries manually.

Depending on your requirements, a standalone application might be much
easier to develop, the only drawback is that you'd have to have a user
logged on all the time for the application to run.

JB
 
M

Mr. Arnold

Dean Slindee said:
Need to write a standalone application that processes data once per day.
Looking for the application program types available that would satisfy
these requirements:
Requirements:
1. Unattended processing that looks for rows in tables in a SQL Server
database that is updated in batch once per day via another company's daily
process. The newly added rows are selected based on a process date
parameter (see #4).
2. Cleans and reformats the selected data rows, and then updates tables on
another SQL Server database.
3. Need to be able to run in a manual mode in case of rerun. User would
need to supply the process date parameter (any date).
4. The automated date parameter would be one day greater than the Max date
parameter found in a ProcessHistory table where one summary row would be
inserted by this process each day upon successful completion of this
process.

What program types might fit, and how would they work? Windows Service,
Batch file that launches an .exe, some combination, other ideas?

What would work are a .Net Console application or a .Net Windows service
application with either one on a thread timer that awakes the thread, does
the processing on the child thread, and the thread goes back to sleep and
waits for the next countdown interval to execute the thread again. The
program is always running. It would be a continuous running application that
a command must be issued to shutdown/terminate the program's execution.

There can be more than one child thread with each child thread dedicated to
a particular function that it performs once the thread awakes. There are
ways to get program execution information that could be read via a
configuration XML file that the application uses.

It's a piece of cake. I have done what you are wanting to do with both types
of .Net program solutions.

The trick would be to send a email and logging the error when things are not
working properly, such as SQL Server going down.
 
J

JB

Hi Dean,

Responding to your email below:
I need just one parameter, and it could be Today.Date, so I might not
need the Windows Form Client application.
What exactly do you mean by "runs the scheduler"? I need to Start the
process once per day and it could be at a fixed time, say 2AM. Since
the Windows Service is continually running, are you interacting with
the Scheduled Events on the host server?

In my case the Windows Form application is only here because a Windows
Service shouldn't interact with the UI.
It looks like you could just use a Windows Service on its own. Any
parameters you need (e.g. frequency of the run, process date, etc)
could be stored in a config file read by the service upon starting up.
By Run the Scheduler I mean the timer that wakes up every interval and
do the job that needs to be done (e.g. Query the Database).
The Windows Service could run on the host server.

Regards
JB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top