Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8409281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:51:54+00:00 2026-06-09T23:51:54+00:00

I am working with a console application that scans multiple image directories and re-sizes

  • 0

I am working with a console application that scans multiple image directories and re-sizes then saves images if they exceed a certain size. Once a directory is finished processing a log is then pushed to a web-service page.

This utility program will be run at night for a given number of hours but must be shut down before normal office hours the following day, regardless of if it finished processing the current folder.

I am aware of 3 options to shut the program down:

  1. Via Scheduled task setting “shut down after X hours”: The concern I have with this option is that it might potentially close the program in the middle of the process, such as between saving the image and logging to the server.
  2. After processing each image check the DateTime and if after certain time close it
  3. User a Timer, set tick to a few hours, once tick handler is called then set a bool flag to false. After processing each image check the bool flag to see if it is time to shut the program down.

Does the timer option have a performance advantage over comparing DateTime?

Is there perhaps an even better way? Maybe I am missing something?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T23:51:56+00:00Added an answer on June 9, 2026 at 11:51 pm

    Checking the DateTime between processing seems like the best approach here.

    Even if you use a Timer, you’ll likely still want to check the current time when the timer event fires to make sure that it’s time to exit. Just checking the time against a cutoff time seems like the simplest option all around.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a console application that tries to download some files from a
I m working on a console application that tries to download some files from
Working with a Visual Basic.NET console application that features a VERY BASIC natural language
When working with a console application, a history of everything that has been entered
I have a threaded console application that is working fine, but it's architecture needs
I am working on a console application that get a number of page faults
I am working on a console application, that receives a pretty long list of
I am working on a console application that I want to run in the
I have a game that I am working on in a C# console application,
I'm working on a JavaScript application that can generate animated GIF images. GIF images

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.