CircleCI-Public / slack-orb

Create custom Slack notifications for CircleCI job statuses
https://circleci.com/developer/orbs/orb/circleci/slack
MIT License
212 stars 205 forks source link

Allow scheduling messages #452

Open yesteph opened 1 week ago

yesteph commented 1 week ago

Describe Request:

Our CircleCI pipelines need to send Slack notifications after long period (about several days). Using standard job with sleep X command for that is totally inefficient and will not work because of the different timeouts.

An alternative is the orb uses the scheduling message capability of Slack.

To implement that, the orb must support a new parameter post_at. If the this parameter is not null, the API must be chat.scheduleMessage instead of the current default one chat.postMessage.

Examples:

workflows:
  send-scheduled-notification:
    jobs:
      - notify:
          context: slack-secrets
          post_at: 1551891428

Supporting Documentation Links:

https://api.slack.com/messaging/sending#scheduling