brettcannon / python-azure-web-app-cookiecutter

Cookiecutter template for a Python site on Azure Web Apps
MIT License
6 stars 2 forks source link

add worker job/roles in template #6

Open sdementen opened 7 years ago

sdementen commented 7 years ago

would it be possible to add an example of deployment for a worker role/job that uses the same python interpreter as the web app ?

brettcannon commented 7 years ago

I would have to read up on how different they are from a web app. It might not be appropriate to roll up into this template.

sdementen commented 7 years ago

I have added the Webjob after using your template to start with. It is just a matter of creating a specific subfolder hierarchy and adding in it a cmd/bat script and a setting.json with amonst other the cron expression. I will post an example as soon as i can (later today)

sdementen commented 7 years ago

You can find the directory structure with an example of "triggered" web job. Unzipping the file in the app folder will automatically create the webjob when deployed. app_data.zip

More information on http://blog.amitapple.com/post/74215124623/deploy-azure-webjobs/#.WLF0XlXyu00

sdementen commented 7 years ago

I wonder if these webjobs should created by the cookiecutter logic or by adding some 'admin' script allowing to create new jobs after the cookiecutter has been instantiated