-1

I have written a Lambda to fetch some prices on Nifty Index(share market) which runs every 5 mins and uploads data to S3.

For this i have written a cron using AWS EventBridge schedule given below

15/5 9-15 ? * MON-FRI *

now the problem is this runs from 9-15 AM to 4 PM but i want to run only till 3 - 30 PM daily. So its running 30 mins extra which is consuming more space on s3 also

Any suggestions? Couldnt find elsewhere

Tried 15/5 9-15 ? * MON-FRI *

Current 9-15 AM to 4 PM

Expectation 9-15AM to 3-30 PM

1 Answers1

0

This 15/5 9-15 ? * MON-FRI * expression will run At every 5th minute from 15 through 59 past every hour from 9 through 15 on every day-of-week from Monday through Friday.

In your case between each hours 00 and 15 minutes (1X.00-1X.15) this cron will not execute. So that you need more than one expression to meet your requirements.

  • 30/5 9 ? * MON-FRI * -> From 9.30-9.55
  • */5 10-14 ? * MON-FRI * -> From 10.00-14.55
  • 0-30/5 15 ? * MON-FRI * -> From 15.00-15.30
Mehmet Güngören
  • 2,383
  • 1
  • 9
  • 16