Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch Job

Status
Not open for further replies.

CrystalUser1

Programmer
Sep 16, 2004
138
US
we have a batch job which runs eevery hour. Some times if the job runs for more than an hour long, we don't want to run the job for the next hour. let me explain this more. This job started running at 3pm and it didn't finish by 4 pm for some reasons, so we don't want to run this at 4pm as schduled. Any idea? pls help.
 
how do u run this job? using .NET???

Known is handfull, Unknown is worldfull
 
excuse my ignorance, but how do u run a batch job using .NET, it doesnt have any methods to run a procedure once every hour (like a database Job)...

Known is handfull, Unknown is worldfull
 
Simplest way is to write a flag to the database for Batch Processing Status, simply 1 for Running or 0 for Idle.
If 4pm arrives and the status is still 1 (ie process still running, dont start it again). Just make sure you remember to set the running status back to 0 upon completion.


Sweep
...if it works dont f*** with it
...if its f****ed blame someone else
...if its your fault that its f***ed, say and admit nothing.
 
OK, This is a windows C# application run using Microsoft Job scheduler. Scheduker will take care of running the job everyhour. But we need to take care of stopping it if its already running within the application. One appraoch is using Process Info. Any better approaches?
 
windows C# application
If this is a windows application, you'll be better off asking in the C# forum.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top