The best way to remember to send invoices at the last business day of the month.
See also: https://zenn.dev/ttanimichi/articles/7a0877a771b6c3
You need to install Ruby at first. And, then:
$ bundle install
$ bundle ex ruby main.rb
You need to set Slack's WEBHOOK_URL as the value of an environment variable INVOICE_REMINDER_WEBHOOK_URL
$ cat /etc/environment | grep INVOICE_REMINDER_WEBHOOK_URL
INVOICE_REMINDER_WEBHOOK_URL="https://hooks.slack.com/services/xxx/xxx/xxx"
To get the Slack's WEBHOOK_URL you need:
- go to https://slack.com/apps/A0F7XDUAZ-incoming-webhooks
- choose your team, press configure
- in configurations press add configuration
- choose channel, press "Add Incoming WebHooks integration"
$ crontab -l
MAILTO=""
45 11 * * * /usr/bin/ruby /home/ubuntu/invoice_reminder/main.rb
$ bundle ex rspec ./spec.rb