Hey guys… I want to run my polling function every ...
# sst
a
Hey guys… I want to run my polling function every 1 minute… my cron is like this..
Copy code
return new Cron(this, 'searchCompaniesCronJob', {
      schedule: { minute: '1' },
      job: searchCompaniesFunction,
    });
But I don’t see it being triggered every 1 minute.
d
Pretty sure that means run at minute 1, which in cron terms, means run at minute 1 every hour. You probably want to use a rate expression.
a
Yeah you are right.
Just tested
schedule: 'rate(1 minute)',
and looks like it works!
😄
Thank you sir.