I have a .NET 4 console application, that when run makes data requests using ERPConnect using an R3Connection to SAP and fetches some mapping data from a SQL Server database before loading transformed data into that same SQL Server database.
I have been asked to make this run on a daily schedule.
Does anyone have recommendations on how this should be done?
My initial thoughts would be: A .bat file and Windows Task Scheduler OR Windows Powershell
Does anyone have any suggestions or reasons why you would pick one over the other?
I would just use Windows Task Scheduler, and schedule the task. This is a simple, easily reconfigurable approach, and can be configured to run your console application directly (with no need for the batch file).
The advantage here is that you can change the schedule, such as time of day or frequency at any time, merely by configuring the system's schedule.
I would suggest doing it using Windows Task Scheduler and the batch file. A question would be , though, do you actually need the batch file? I have plenty of apps that are called from the WTS and it can call applications directly. I'd suggest altering your console app so you can eliminate the need for a batch file.
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