Click here to Skip to main content
15,886,578 members

Comments by Jacob Himes (Top 20 by date)

Jacob Himes 26-Sep-16 14:03pm View    
This site is for questions, not a free do-my homework/job for me emporium.
Jacob Himes 30-Jun-16 15:30pm View    
Very true, its annoying the nomenclature of the dev world.
Jacob Himes 29-Jun-16 18:15pm View    
The management of the console application is not taken care of by user implementation. The console application is started by a scheduled task, as In this time of day, not by a http request or a request running on a schedule. It is nearly the same as scheduling a program to run on your local machine with Windows at a certain time of day. It is executed by the fabric of the cloud environment PaaS. Windows service is not an option unless you have a virtual machine, which costs a few more dollars, OP has a shared web instance, they do not run windows services.

Of course I may be misunderstanding OP's question in the sense he wants this task to run every time a record is created, but he said "schedule" then "task", then mentioned how he cannot do it in a shared hosting instance via a windows service, so I'm at the mercy of context clues here.

FYI I totatly agree with you that invoking a new console process should never be at the end of a stateless http call.
Jacob Himes 29-Jun-16 13:36pm View    
Yes you are very right the misconception needs to be addressed. I'm actually still unsure if the client met a web form or a windows form since later in the question he mentions he tried writing a windows service. It is a common misconception by beginners to create a blank windows form to perform a task that requires no user interaction.

Console applications are great for web jobs, and recommended along bat files and other script file types. The web job controls the lifetime of the application. It fires up the console application...waits for it to complete, and then will not fire it up again until the next scheduled time. Console applications when written correctly close themselves when they are done executing. If a continuous job is needed, the console app is written as an endless loop. Also, all output of the app is stored in the cloud log. This is standard in cloud solutions like Azure, BlueMix, and Amazon.

Here's a link to how a web job works in Azure.

https://azure.microsoft.com/en-us/documentation/articles/web-sites-create-web-jobs/

Jacob Himes 23-Jun-15 19:26pm View    
Amen, never use concatenation for queries. And data model your database layer if you can.