Reputation: 33
I want to run a scheduled script using WebJob. Due to source control enabled, I could not create WebJob using portal & had to copy files using Kudu (Diagnostic) Console. These are the files under triggered jobs in the folder:
The run.js file simply calls an API. The settings.job contains the schedule I want it to run at:
{
"schedule": "0 /1 * * * *"
}
But the job does not start on its own or shows up in list of WebJobs:
Is there something else that needs to be done to publish or trigger a WebJob or something more that I need to add to settings.job file? I have been referring to this
Upvotes: 1
Views: 829
Reputation: 21949
Follow my steps, you can solve the problems you can't add webjob on portal.
Due to source control enabled, I could not create WebJob using portal & had to copy files using Kudu (Diagnostic) Console.
Step 1. Add a webjob arbitrarily on the portal.(upload .zip
file or create by kudu)
Step 2. Deploy by VS2019(source control)
Step 3. After success, you will find you can add webjob by upload .zip
file.
Now, I will upload nodejs webjob.
Please note that you need to create a continuous or Triggered webjob. The two are different. In the portal, the schedule of the continuous webjob is displayed as n/a, while the Triggered display format is such as: 0 */15 * * * *
.
Finally ,let us check the content in .zip file.
Upvotes: 0