Automatic exporting excel

Hello I would like advice.
I need to automate a sending files excel extrapolating from a query in SQL Server: Friday at 20 I have to do the sending.
I can do it with SC? How do you implement?
Thank you.

Create the application as a blank application as that doesn’t require a user interface (html page). Make sure you can control your application by sending parameters through the url. Then put it in your Cron or schedular.