I have an operation that needs to be run once every day at 12 AM. I have implemented the same by using Condition check constraints matching DateTime.Now.Hour == someValue; However, I don't want the while loop to be running n number of times for just one time operation. I have made the thread to sleep But still I ain't satisfied with the solution. Trying out with Timers will also wont work out. Do we have any concepts called Clock or Time coupled with events which invokes a particular action on a respective time. Please clarify.
Calling a method or action during a particular time
66 Views Asked by Darey At
1
There are 1 best solutions below
Related Questions in C#
- How to call a C language function from x86 assembly code?
- What does: "char *argv[]" mean?
- User input sanitization program, which takes a specific amount of arguments and passes the execution to a bash script
- How to crop a BMP image in half using C
- How can I get the difference in minutes between two dates and hours?
- Why will this code compile although it defines two variables with the same name?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Why can't I use the file pointer after the first read attempt fails?
- #include Header files in C with definition too
- OpenCV2 on CLion
- What is causing the store latency in this program?
- How to refer to the filepath of test data in test sourcecode?
- 9 Digit Addresses in Hexadecimal System in MacOS
- My server TCP doesn't receive messages from the client in C
- Printing the characters obtained from the array s using printf?
Related Questions in THREAD-SLEEP
- ASP.NET Core 6 Web API : best way to pause before resending email
- Thread.Sleep() vs Task.Delay().Wait()
- Spring API throw interrupt signal when using Thread.sleep()
- Looking for clarity on Thread.sleep() method
- How to replace Thread.sleep with WebDriverWait to avoid StaleElementReferenceException
- The problem of waking up existing threads in the ThreadPool
- How can I avoid Chrome to suspend my app tab?
- Using Thread Sleep in an application to Control a motor - Is there a better alternate
- How to remove a letter from the terminal and replace it with a new one in java?
- Selenium - the .click() command is not executed when I use Explicit Wait but when I use Thread.sleep it does
- I need to use locks but dont know how in a networking problem
- With very short sleep times, why does a thread only finish zero or one iteration of printing before seeing the stop flag set?
- counting a vector containing random numbers ranging from 0 to 9 using threads
- Why is my app not waiting when using sleep
- JProgressBar moves instantly and not gradually (java)
Related Questions in SYSTEM.TIMERS.TIMER
- CS0123 No overload for 'method' matches delegate System.Timers.ElapsedEventHandler
- Reducing delay between System.Timers.TImer calls
- timer configuration not working in console application c#
- C# how to get a object back from a system.timer and use it in the calling tread
- Why would my timer does not dynamically display the file size?
- EF: PROBLEM WITH DBCONTEXT ACCESS FROM 2 DIFFERENT System.Timers.Timer
- C# service from console application
- C# .NET6.0 System.Timers: When elapsed event is fired the eventhandler is executed multiple times
- In ASP.NET web application, in which method do I implement a timer that calls a function every 5 minutes? There's no main() could it be in PageLoad?
- System.Timers.Timer not firing at the interval set
- How to send a message to a Discord Channel every X seconds?
- How to periodically check for status using an asynchronous method and support timeout?
- How to use System.Timers.Timer properly inside a class
- Timeout for System.Timers.Timer and exception throwing
- Is the System.Timers in C# precise enough when I want to execute some code exactly every 30ms?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
some options:
in short, timers help avoid constant polling.. and Sleep allows you to regulate your polls. better than an insane while loop, which might affect CPU.