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

What timezone? #3

Closed
MrMMorris opened this issue Jul 28, 2015 · 5 comments
Closed

What timezone? #3

MrMMorris opened this issue Jul 28, 2015 · 5 comments
Assignees

Comments

@MrMMorris
Copy link

Thanks for the awesome plugin!

I was wondering what timezone does cron follow? Is it the timezone of the server hubot is running on? or UTC?

It would be cool to be able tot set a timezone with an env var or something :)

@matsukaz
Copy link
Owner

matsukaz commented Aug 4, 2015

Thanks for your comment :)

This plugin doesn't handle any timezone, so as you mentioned, the cron follows on the server time settings.

I was also thinking of supporting timezone, but the "node-schedule" I'm using doesn't support it, so it's quite hard to do so.

May be I should use "node-cron" instead, which act like "cron-parser" and also supports timezone.
Anyway, I'll try to support timezone in next few days.

@MrMMorris
Copy link
Author

@matsukaz no worries on the timezones. My servers are in UTC anyways so it's not hard to adjust. Probably more work than it's worth.

I should note, however, that there is some weirdness with the script.

It seems I can create schedules and they work fine, but when I delete them, even though it doesn't run anymore and is gone in Redis, they all still show up with hubot schedule list

$ Hubot schedule list
Message is not scheduled

$ Hubot schedule new "1 1 * * 1-4" blah
8085: Schedule created

$ Hubot schedule list
8085: [ 1 1 * * 1-4 ] #test blah

$ Hubot schedule remove 8085
8085: Schedule cancelled

$ Hubot schedule list 
8085: [ 1 1 * * 1-4 ] #test blah

Not sure if it's being cached or something.

@matsukaz
Copy link
Owner

matsukaz commented Aug 5, 2015

Humm, that's weird...
I'll try to fix that first, and than think about timezone later.

@matsukaz
Copy link
Owner

matsukaz commented Aug 6, 2015

@MrMMorris
I've just fixed the bug you have mentioned and bumped version to 0.2.1. Thanks for your report!

@matsukaz matsukaz self-assigned this Aug 6, 2015
@MrMMorris
Copy link
Author

you're amazing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants