diff --git a/README.md b/README.md index bfda095d..a9282859 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,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 diff --git a/smack_my_bitch_up.rb b/smack_my_bitch_up.rb index b81a3349..5eedc2a9 100755 --- a/smack_my_bitch_up.rb +++ b/smack_my_bitch_up.rb @@ -11,7 +11,7 @@ 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 @@ 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}" )