jitu7
April 9, 2018, 5:55am
1
This should run at 4.30 AM UTC, but not working. Though rate is working and also cron with all * option is working…
pickDailyTest:
handler: src/api/agenda/index.pickDailyTest
events:
- schedule:
enabled: true
name: jobPickDailyTest
description: 'Daily job called to pick test'
rate: cron(30 4 * * ? *)
Franky
April 9, 2018, 10:03pm
2
Schedule definition seems to be okay.
I assume there is something wrong with your handler.
Check your serverless.yml file with sls print
Deploy your serverless.yml file with sls deploy -v
Test your handler manually with sls invoke -f pickDailyTest -l
Check Cloudwatch Logs after 4:30AM for entries
jitu7
April 12, 2018, 11:02am
3
Thanks!
Can you please let me know how to test locally with UTC time.
jitu7
April 30, 2018, 8:26am
4
@Franky Hi, Thanks! but cron is running when I used * for all six options but unable to run with defined UTC time…
send:
handler: am.send
events:
- schedule:
rate: cron(40 10 ? * 3 *)
- http:
path: send
method: get
cors: true
I am having exactly the same issue. Cron does not work on a defined time. I tested with rate(3 minutes) it worked perfectly. It also works when I trigger my function making a GET request.
I checked Cloudwatch logs. My function is never called when using CRON.
Would you know what I else I could do? Thanks.