Reputation: 10829
I am trying to run a cron in google app engine which should run a node.js script every 2 minute but i always get 404 error in the log. I see the cron is running every 2 minute but its not finding the script cronRun.js. Below is the relevant part of the code.
cron.yaml
cron:
- description: "daily summary job"
url: /task
schedule: every 2 minutes
app.yaml
runtime: nodejs
env: flex
api_version: 1
threadsafe: true
handlers:
- url: /task
script: cronRun.js
log:
"GET /task" 404
By this I see that I am not defining the path correctly.
Below is the file structure
Upvotes: 0
Views: 441
Reputation: 8178
Have you tried making a request to the /task endpoint directly, without going through the Cron job?
The problem may be related to the application itself and not the Cron job, so I would recommend you to test it by accessing your App Engine application with the /task endpoint.
If it does not work, the issue is definitely caused by the application and not Cron.
Upvotes: 1