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

set the scheduler location in the cron expression and add CronWithSeconds() #156

Merged
merged 1 commit into from
Apr 13, 2021

Conversation

JohnRoesler
Copy link
Contributor

@JohnRoesler JohnRoesler commented Apr 8, 2021

What does this do?

  • explicitly sets the location for the crontab expression using CRON_TZ - the parse expression defaults to time.Local, which doesn't handle when a caller is setting a different timezone for the scheduler
  • add a new method CronWithSeconds() that the parsing of seconds which robfig exposes
    • i made this a separate method because standard cron expressions don't support seconds, so rather than have the Cron() func optionally support seconds i thought making explicit was better

Which issue(s) does this PR fix/relate to?

List any changes that modify/break current functionality

Have you included tests for your changes?

Did you document any new/modified functionality?

  • Updated example_test.go
  • Updated README.md

Notes

@JohnRoesler JohnRoesler merged commit c85c6ca into go-co-op:master Apr 13, 2021
@JohnRoesler JohnRoesler deleted the cron-seconds branch April 13, 2021 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant