Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Scheduler #28

Open
ghost opened this issue May 15, 2020 · 3 comments
Open

feat: Scheduler #28

ghost opened this issue May 15, 2020 · 3 comments
Labels
💬 Discussion Needs to be discussed

Comments

@ghost
Copy link

ghost commented May 15, 2020

I'd like my mails to only be sent at certain hours for example: between 9 AM and 5 PM.

@ghost ghost changed the title feat: Schedule mailing feat: Scheduler May 15, 2020
@kumarabhirup kumarabhirup added the 💬 Discussion Needs to be discussed label May 15, 2020
@kumarabhirup
Copy link
Owner

kumarabhirup commented May 15, 2020

The bulk-mail-cli configuration has an interval config that can take a cron setting.

So what you want is technically achievable in bulk-mail-cli v2.

{
...
"configuration": {
    "mailInterval": "*/10 * * * * *", // Cron Expression: To mail every 10 seconds [ >= 10 seconds recommended ]
  }
...
}

Reference Link: https://stackoverflow.com/questions/41743720/crontab-run-every-15-minutes-between-certain-hours

In case I am incorrect or something doesn't work, let me know, I can create a separate feature for this :D

@koppor
Copy link

koppor commented Jul 26, 2020

I don't understand the semantics of mailInterval. A) Is the same email sent each 10 seconds to all receipient? B) Is the same email mails once to one receipient and then in next interval to the next one?

Refs #27

@kumarabhirup
Copy link
Owner

Yes. It's B). It sends email once and then after the interval to the next one and so on.

By the way, make sure you set the cron string to at least 2 minutes as the cron has hard time working with seconds. Will add this in next update.

@kumarabhirup kumarabhirup reopened this Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💬 Discussion Needs to be discussed
Projects
None yet
Development

No branches or pull requests

2 participants