Giter Site home page Giter Site logo

matsukaz / hubot-schedule Goto Github PK

View Code? Open in Web Editor NEW
46.0 46.0 18.0 48 KB

A hubot script to schedule a message in both cron-style and datetime-based format pattern

License: MIT License

CoffeeScript 100.00%
coffeescript cron hubot hubot-schedule scheduler

hubot-schedule's People

Contributors

drobati avatar matsukaz avatar moqada avatar notok avatar oroce avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hubot-schedule's Issues

What timezone?

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 :)

Timezone support

Currently, hubot-schedule does support timezone in datetime pattern.
Followings are the result which I run in my local machine that the timezone is set to JST.

Hubot> hubot schedule add "2015-10-16 10:00" Let's release this script!
1632: Schedule created
Hubot> hubot schedule add "2015-10-16 10:00 +00:00" Let's release this script! (with timezone)
1756: Schedule created
Hubot> hubot schedule list
1632: [ Fri Oct 16 2015 10:00:00 GMT+0900 (JST) ] #Shell Let's release this script!
1756: [ Fri Oct 16 2015 19:00:00 GMT+0900 (JST) ] #Shell Let's release this script! (with timezone)

But the cron pattern doesn't support setting timezone yet.
I'm thinking about supporting timezone settings in 2 ways.

  1. setting timezone globally
env.HUBOT_SCHEDULE_TIMEZONE = JST

This will change the timezone from server time to specified timezone.

  1. setting timezone each time

Like datetime pattern, setting timezone each time in cron pattern.

Hubot> hubot schedule add "0 10 * * 1-5"  hubot image me coffee
5321: Schedule created
Hubot> hubot schedule add "0 10 * * 1-5" "+00:00"  hubot image me coffee (with timezone)
5548: Schedule created
Hubot> hubot schedule list
5321: [ 0 10 * * 1-5 ] #Shell hubot image me coffee
5548: [ 0 10 * * 1-5 ] +00:00 #Shell hubot image me coffee (with timezone)

I'm quite busy now, so it may take a while to handle this issue.

handle UTF8 quotes

Slack OS X app auto-convert quotes to UTF8 quotes as default action.

miyagawa/hubot-cron#29

You need to uncheck Enable spellcheck on your messages for workaround, but it might be nice idea to support both quotes and UTF8 quotes.

Support multiline message

Currently, scheduling multiline message is not supported.

I think multiline message is sometimes useful.
For example, like this

hubot schedule add "2016-05-11 10:25" MEETING will start in 5 minutes.
Location: Meeting room 155
Attendees: @Sato, @Tanaka, ...
Note: **Do NOT forget to bring the text.**

multiline message can be achieved like following.

https://github.com/notok/hubot-schedule/tree/support_multiline

If you'd like to make it an option, see this.

https://github.com/notok/hubot-schedule/tree/support_multiline_optional

Please tell me if you want a PR.

Schedules don't show up when upgrading from 0.5.1 to 0.6.1

Greetings,
I'm using hubot with hubot-slack version 4.5.4. I attempted to upgrade by bot's dependency on hubot-schedule from 0.5.1 to 0.6.1, but during testing, none of the scheduled events show up with @hubot schedule list.
I downgraded hubot-schedule back to 0.5.1 and things seem to work again.

This is what (some) of the data in the hubot:storage key in redis looks like:

{
	"_private": {
		"hubot_schedule": {
			"1564": ["0 0 * * *", {
					"room": "C1A2BCD3E",
					"id": "U0FGHI12J",
					"team_id": "T0ABCD1EF",
					"name": "ian.ward"
				}, " test message!"]
		}
	}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.