-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes
49 lines (18 loc) · 858 Bytes
/
notes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
from slack
administration > manage apps > build > start building
give the app a name, select which team it can post to and select to create the app
select incoming webhooks and activate
scroll down, select add new webhook to werkspace
select a chanel & authorise
curl example
curl -X POST --data-urlencode "payload={\"channel\": \"#general\", \"username\": \"coay\", \"text\": \"$(fortune)\", \"icon_emoji\": \":cow:\"}" https://hooks.slack.com/services/YOUR/WEBHOOK/URL
----------------------------------
nano cowslack.sh
#!/bin/bash
PATH=/usr/local/bin:/bin RESTO F PATH AS APPROPORIATE
curl -X POST --data-urlencode payload blah blah
chmod u+x cowslack.sh
cp cowslack /usr/local/bin/
sudo crontab -e
add a line to cron with the schedule for your command and the path to your command
30 7 * * * * /usr/local/hin/cowslack.sh