Ich kämpfe mit einem Cron-Job mit gesicherten URL in Google App-Engine. Sobald ich hinzufügen login: admin in der app.yaml, kann der Job nicht starten (sonst funktioniert es wie ein Charme).Secured Cron Job für Google App Engine startet nicht (Node js)
Hier ist mein Code:
app.js
const express = require('express'); const app = express(); app.get('/', (req, res) => { res.status(200).send('Hello, world!').end(); }); app.get('/admin', function(req, res){ \t res.status(200).send('Hello, admin!').end(); }); // Start the server const PORT = process.env.PORT || 8080; app.listen(PORT,() => { console.log(`App listening on port ${PORT}`); console.log('Press Ctrl+C to quit.'); });
app.yaml
runtime: nodejs env: flex handlers: - url:/ script: app.js - url: /admin login: admin script: app.js
cron.yaml
cron: - description: daily summary job url: /admin schedule: every 12 mins target: default
Und das Ergebnis: cron failure
Jeder Hinweis auf das, was ich fehle?
Vielen Dank im Voraus