So here's my problem, I need to do a c# service running on a server who's getting file on ftp one time per day at 3am. I think that I can do it with a thread.sleep() or by compare the DateTime.Now with 3am....
Do you have better solution?
Thank you very much for your help!
Compilation process in C involves four steps: pre-processing, compiling, assembling, and linking. The preprocessor tool helps in comments removal, macros expansion, file inclusion, and conditional compilation. These commands are executed in the first step of the compilation process.
An executable file (EXE file) is a computer file that contains an encoded sequence of instructions that the system can execute directly when the user clicks the file icon. Executable files commonly have an EXE file extension, but there are hundreds of other executable file formats.
Answer. Step0: Install C-Program Compiler (gcc) You will need a C compiler to do this already installed, I use GCC. If you are on a Windows computer, you can run the command gcc -v to check if it's already installed.
Write a console app or equivalent, and use the Windows Scheduler (or whatever it's called nowadays...) to run it daily.
I've used Scheduled Tasks successfully for backups, but I have a word of caution ...
Scheduled tasks are not be performed if you log out. I'm not sure if this can be overidden, but I have been caught out by tasks not performed because Windows automatically updates, reboots and sits waiting for me to log-in.
I disabled automatic updates - Windows should ASK first.
Another consideration is that 3AM is a time when many users would normally be logged out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With