Merge cf4bb03e27 into b14a0a89bd
This commit is contained in:
commit
d743204f1e
|
|
@ -42,6 +42,12 @@ GMAIL_PASSWORD=password
|
|||
For Ruby scripts you need to install gems:
|
||||
`gem install dotenv twilio-ruby gmail`
|
||||
|
||||
## Cron jobs for Ruby
|
||||
|
||||
`'" 20 21 * * 1-5 /usr/local/bin/ruby /local/myuser/rubyscript/smack_my_bitch_up.rb >>
|
||||
/local/myuser/rubyscript/log.txt "'`
|
||||
and remaining crons in same way for Ruby.
|
||||
|
||||
## Cron jobs
|
||||
|
||||
```sh
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Dotenv.load
|
|||
TWILIO_ACCOUNT_SID = ENV['TWILIO_ACCOUNT_SID']
|
||||
TWILIO_AUTH_TOKEN = ENV['TWILIO_AUTH_TOKEN']
|
||||
|
||||
@twilio = Twilio::REST::Client.new TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN
|
||||
twilio = Twilio::REST::Client.new TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN
|
||||
|
||||
# Phone numbers
|
||||
my_number = '+xxx'
|
||||
|
|
@ -20,11 +20,13 @@ her_number = '+xxx'
|
|||
reason = [
|
||||
'Working hard',
|
||||
'Gotta ship this feature',
|
||||
'Someone fucked the system again'
|
||||
'Someone fucked the system again',
|
||||
'Gotta fix bugs urgently',
|
||||
'Gotta scale up the system'
|
||||
].sample
|
||||
|
||||
# Send a text message
|
||||
@twilio.messages.create(
|
||||
twilio.messages.create(
|
||||
from: my_number, to: her_number, body: "Late at work. #{reason}"
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue