This commit is contained in:
Subhash Chandra 2022-09-30 00:20:01 -04:00 committed by GitHub
commit d743204f1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View File

@ -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

View File

@ -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}"
)