Skip to content

Conversation

@ehou1000
Copy link

What has been done

How to test locally

Hubot> ralph help schedule
ralph schedule [add|new] "<cron pattern>(,<utc offset>)" <message> - Schedule a message that runs recurrently
ralph schedule [add|new] "<datetime pattern>" <message> - Schedule a message that runs on a specific date and time
ralph schedule [add|new] #<room> "<cron pattern>(,<utc offset>)" <message> - Schedule a message to a specific room that runs recurrently
ralph schedule [add|new] #<room> "<datetime pattern>" <message> - Schedule a message to a specific room that runs on a specific date and time
ralph schedule [cancel|del|delete|remove] <id> - Cancel the schedule
ralph schedule [upd|update] <id> <message> - Update scheduled message
ralph schedule env - Show hubot schedule environments
ralph schedule list #<room> - List all scheduled messages for specified room
ralph schedule list - List all scheduled messages for current room
ralph schedule list all - List all scheduled messages for any rooms

@ethowitz
Copy link

ethowitz commented Apr 22, 2020

There may be some weirdness surrounding specifying topic and stream names given https://github.com/zulip/hubot-zulip/blob/master/adapter.coffee#L103
and
https://github.com/matsukaz/hubot-schedule/blob/master/src/scripts/schedule.coffee#L56

(I don't know what msg.match[1] is doing, but I am afraid that the space between the stream and topic names won't work here)

edit JK the regex checks out
image

Copy link
Contributor

@raws raws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works great, except for how schedules don't seem to actually cancel until the bot is restarted 😬 They get removed from persisted storage, but I think this line in hubot-schedule isn't doing what it's supposed to:

https://github.com/matsukaz/hubot-schedule/blob/e4b22f54d9d47d9b7698901d6dd650607119a011/src/scripts/schedule.coffee#L189

Screen Shot 2020-04-24 at 2 16 06 PM

@ethowitz
Copy link

@raws what are you talking about this seems like ideal behavior

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

Development

Successfully merging this pull request may close these issues.

4 participants