{"id":20184816,"url":"https://github.com/matsukaz/hubot-schedule","last_synced_at":"2025-04-10T06:06:43.796Z","repository":{"id":25844953,"uuid":"29284535","full_name":"matsukaz/hubot-schedule","owner":"matsukaz","description":"A hubot script to schedule a message in both cron-style and datetime-based format pattern","archived":false,"fork":false,"pushed_at":"2019-08-05T05:18:52.000Z","size":48,"stargazers_count":46,"open_issues_count":1,"forks_count":18,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-07T19:08:30.466Z","etag":null,"topics":["coffeescript","cron","hubot","hubot-schedule","scheduler"],"latest_commit_sha":null,"homepage":null,"language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matsukaz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-15T06:41:44.000Z","updated_at":"2023-08-17T12:34:04.000Z","dependencies_parsed_at":"2022-09-02T05:41:14.676Z","dependency_job_id":null,"html_url":"https://github.com/matsukaz/hubot-schedule","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsukaz%2Fhubot-schedule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsukaz%2Fhubot-schedule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsukaz%2Fhubot-schedule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsukaz%2Fhubot-schedule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matsukaz","download_url":"https://codeload.github.com/matsukaz/hubot-schedule/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224556938,"owners_count":17331088,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coffeescript","cron","hubot","hubot-schedule","scheduler"],"created_at":"2024-11-14T03:09:13.362Z","updated_at":"2024-11-14T03:09:14.060Z","avatar_url":"https://github.com/matsukaz.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hubot-schedule\n\n[README_ja.md](README_ja.md)\n\n[![NPM version](https://badge.fury.io/js/hubot-schedule.png)](http://badge.fury.io/js/hubot-schedule)\n\n[![NPM](https://nodei.co/npm/hubot-schedule.png?downloads=true)](https://nodei.co/npm/hubot-schedule/)\n\nhubot-schedule is a message scheduler runs on hubot.\n\nIt allows you to schedule a message in both `cron-style` and `datetime-based` format pattern.\nIt is for time-based scheduling, not interval-based scheduling.\n\nSince hubot-schedule uses node-schedule to manage schedule, some of the cron features are not supported.\nPlease see [node-schedule](https://github.com/mattpat/node-schedule) for more details.\n\nThis script is greatly inspired by [hubot-cron](https://github.com/miyagawa/hubot-cron).\nAt first, I wanted a datetime-based scheduler.\nAs I start developing this, I noticed that node-schedule also suppports cron-style scheduling, so I changed my mind to develop a scheduler that supports both cron-style and datetime-based format.\n\n\n## Note\n\n### for Slack users\n\nIf you are using slack adapter such as `hubot-slack`, please use `v4.2.2` or later.\n`v4.2.1` sometimes fails to add new schedule.\n\n\n## Installation\n\nAdd `hubot-schedule` to your `package.json`.\n\n```\n\"dependencies\": {\n  \"hubot-schedule\": \"~0.7.0\"\n}\n```\n\nRun `npm install`.\n\n```\n$ npm install\n```\n\nAdd `hubot-schedule` to `external-scripts.json`.\n\n```\n\u003e cat external-scripts.json\n\u003e [\"hubot-schedule\"]\n```\n\n\n## Usage\n\n```\nHubot\u003e hubot help schedule\nHubot schedule [add|new] \"\u003ccron pattern\u003e(,\u003cutc offset\u003e)\" \u003cmessage\u003e - Schedule a message that runs recurrently\nHubot schedule [add|new] \"\u003cdatetime pattern\u003e\" \u003cmessage\u003e - Schedule a message that runs on a specific date and time\nHubot schedule [add|new] #\u003croom\u003e \"\u003ccron pattern\u003e(,\u003cutc offset\u003e)\" \u003cmessage\u003e - Schedule a message to a specific room that runs recurrently\nHubot schedule [add|new] #\u003croom\u003e \"\u003cdatetime pattern\u003e\" \u003cmessage\u003e - Schedule a message to a specific room that runs on a specific date and time\nHubot schedule [cancel|del|delete|remove] \u003cid\u003e - Cancel the schedule\nHubot schedule [upd|update] \u003cid\u003e \u003cmessage\u003e - Update scheduled message\nHubot schedule env - Show hubot schedule environments\nHubot schedule list #\u003croom\u003e - List all scheduled messages for specified room\nHubot schedule list - List all scheduled messages for current room\nHubot schedule list all - List all scheduled messages for any rooms\n\nHubot\u003e hubot schedule add \"2015-01-16 10:00\" Let's release this script!\n6738: Schedule created\n\nHubot\u003e hubot schedule add \"0 10 * * 1-5\" Don't forget to brew coffee :)\n9735: Schedule created\n\nHubot\u003e hubot schedule list\n6738: [ 2015-01-16 10:00:00 +09:00 ] #Shell Let's release this script!\n9735: [ 0 10 * * 1-5 ] #Shell Don't forget to brew coffee :)\n\nHubot\u003e hubot schedule update 6738 Let's release this module and share with everyone!\n6738: Scheduled message updated\n\nHubot\u003e hubot schedule list\n6738: [ 2015-01-16 10:00:00 +09:00 ] #Shell Let's release this script and share with everyone!\n9735: [ 0 10 * * 1-5 ] #Shell Don't forget to brew coffee :)\n\nLet's release this script and share with everyone!\n(Hubot posts the message at 2015-01-16 10:00:00 and schedule will be removed automatically)\n\nHubot\u003e hubot schedule del 9735\n9735: Schedule canceled\n\nHubot\u003e hubot schedule list\nMessage is not scheduled\n\nHubot\u003e hubot schedule add \"0 10 * * 1-5\" hubot image me coffee\n9735: Schedule created\n(hubot can process messages sent by hubot-schedule, so you can ask hubot to do something at the scheduled time, like post an image of coffee.)\n```\n\nIf you need to persist scheduled messages, use hubot-brain persistent module like [hubot-redis-brain](https://github.com/hubot-scripts/hubot-redis-brain).\n\n### How to use UTC Offset\n\nIf OS timezone is set to Asia/Tokyo（UTC Offset would be \"+09:00\"）\n\n```\nHubot\u003e hubot schedule env\nDEBUG = false\nDONT_RECEIVE = false\nDENY_EXTERNAL_CONTROL = false\nLIST_REPLACE_TEXT = {\"@\":\"[@]\"}\nDEFAULT_UTC_OFFSET_FOR_CRON = \"+09:00\"\n\nHubot\u003e hubot schedule add \"2019-08-05 10:00 +02:00\" use UTC Offset for datetime-based format pattern\n2914: Schedule created\n\nHubot\u003e hubot schedule add \"0 10 * * 1-5, +02:00\" use UTC Offset for cron-style format pattern\n4291: Schedule created\n\nHubot\u003e hubot schedule list\n2914: [ 2019-08-05 17:00:00 +09:00 ] #Shell use UTC Offset for datetime-based format pattern (listed schedules are shown using OS timezone)\n4291: [ 0 10 * * 1-5, +02:00 ] #Shell use UTC Offset for cron-style format pattern\n```\n\n## Configuration\n\n### HUBOT_SCHEDULE_DEBUG\n\nSetting environment variable `HUBOT_SCHEDULE_DEBUG=1` will show some debug messages.\n\n### HUBOT_SCHEDULE_DENY_EXTERNAL_CONTROL\n\nSetting environment variable `HUBOT_SCHEDULE_DENY_EXTERNAL_CONTROL=1` will deny schedule control from other rooms.\n\n### HUBOT_SCHEDULE_DONT_RECEIVE\n\nSetting environment variable `HUBOT_SCHEDULE_DONT_RECEIVE=1` will disable hubot not to process messages sent by hubot-schedule.\n\n### HUBOT_SCHEDULE_LIST_REPLACE_TEXT\n\nSetting environment variable `HUBOT_SCHEDULE_LIST_REPLACE_TEXT='\u003cstringified json\u003e'` will configure the text replacement used when listing scheduled messages.\nDefault configuration is `'{\"@\":\"[@]\"}'`.\n\n### HUBOT_SCHEDULE_UTC_OFFSET_FOR_CRON\n\nSetting environment variable `HUBOT_SCHEDULE_UTC_OFFSET_FOR_CRON='\u003cstring format UTC Offset(e.g. \"+09:00\")\u003e'` will set default UTC Offset for cron-style format pattern.\nIf not set, OS timezone's offset would be used.\n\n## Copyright and license\n\nCopyright 2015 Masakazu Matsushita.\n\nLicensed under the **[MIT License](LICENSE)**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatsukaz%2Fhubot-schedule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatsukaz%2Fhubot-schedule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatsukaz%2Fhubot-schedule/lists"}