cli
cli copied to clipboard
Scheduled functions are not running with Nextjs SSR app
Describe the bug
When I uploaded my nextjs project via CLI, the scheduled netlify functions are simply not firing. I couldn`t see any schedule badge on the project admin console. I can see the uploaded function and can run with the url by hand. I have tried set it in the .toml file and in the function handler as well. If I upload the function without the nextjs project, it is working.
Steps to reproduce
1: clone this project: https://github.com/netlify-templates/next-netlify-starter 2: yarn install 3: make some netlify function 4: set the scheduler for the function 5: netlify deploy --prod
P.S: The nextjs app itself will also failes: 404 ["page not found"]
Configuration
[build] command = "yarn build" publish = ".next"
[[plugins]] package = "@netlify/plugin-nextjs"
[functions."forecast-poll"] schedule = "@hourly"
Environment
System: OS: Windows 10 10.0.22000 CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700K Memory: 19.50 GB / 31.79 GB Binaries: Node: 16.15.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD npm: 8.13.1 - C:\Program Files\nodejs\npm.CMD
"@netlify/functions": "^1.0.0", "@netlify/plugin-nextjs": "^4.9.3",
I also ran into this bug. A workaround that worked for me was scheduling it inline instead of using the netlify.toml
file.
Unfortunately, that's not working for me eighter. Even if I build, deploy from linux(WSL), I still don`t see any scheduling information on the web admin page. Not firing events on its own.
@teddybee have you activated scheduled functions in the Netlify Labs section in your settings?
@minivan No... Thank you for your help. I hope it will work now.