Unable to run cron on defined time

aws
lambda

#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 * * ? *)

#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

#3

Thanks!

Can you please let me know how to test locally with UTC time.