1

I hope this is posted in the correct forum.

I have a Windows 2008R2 web server that runs MySQL. I need to execute a SQL script against the mysql database to create a CSV file, and save to a defined location on the disk within one of my websites. A third party will then, via FTP, connect with their own set of credentials and download this file at a set time once a day.

What I am stumped about decision wise is the most reliable way to make sure the SQL script has executed and the file is on the disk ready for the timed once daily collection.

What is the most reliable - Task scheduler running a .aspx script or calling an EXE (I have had issues in the past with Task Schedulers reliability), an EXE that runs all the time and one a timer once a day prior to 3rd party FTP collection makes sure the CSV file is there, or can anyone suggest a much better way?

Thanks.

  • 1
    "What I am stumped about decision wise is the most reliable way to make sure the SQL script has executed and the file is on the disk ready for the timed once daily collection." - add something like an email notification to yourself that the SQL script executed properly within the task itself. That would allow you to know that it worked correctly. – TheCleaner Jan 6 '15 at 15:41
  • Thanks for that. Yes a good idea. But still I am trying to decide hence putting the question out there as to the most reliable method to execute the actual script that is 'the task' - again, Task Sheduler, taskbar running EXE that works against a timer that runs once a day in time for the 3rd part FTP collection (according to the owner of the web server, a Windows Service is not an option). – user2462433 Jan 6 '15 at 15:51
  • I would simply use Task Scheduler. It's easy and works. I wouldn't rely on its notification mechanism though, since it might say "task completed successfully" but that doesn't mean that portions of your script failed or didn't fail. Put your success/error notification within your actual script itself. – TheCleaner Jan 6 '15 at 15:55
0

Task Scheduler is your best bet. But you said you've had "reliability" issues. Maybe the question isn't about what's the best tool, but what issues are you having?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.