Click here to Skip to main content
14,920,009 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I need to process data from the database and import to a text file and this text file should save in the server.
The text file need to be generated automatically.
I need to run this job every day night at 12:00 am.
Please any one can provide an example for this.
Thanks in advance.

You can use windows scheduler or use a windows service for this. What have you tried so far?
From Start -> Control Panel -> Scheduled tasks
Double click on ADD schedule Task

Click Next to continue
Click Browse to find your consil application folder BIN/Debug/YourConsoleApplicationName.exe
Click Next to continue, then select the desire run time or start time of your application.
Just build a simple headless application for this process and then schedule it with the Windows Task Scheduler as outlined by Yogesh Singh Rawat.
Ensure that you have logging in this type of application so that you can check up on what it did after the fact.
You can create SQL Sever Jobs. Here is an article how to do so[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900