How programmer gets his wife happy (part 2: iMessage)

< 1 min read

Following my post about How programmer gets his wife happy, here is a simpler version for who is using Mac with Message app.

zen8labs programmer ii

Forget all Twilio setup, you just need to create the cronjob. Replace the content and your wife’s number.

1. Create a file, put the command above.

#!/bin/bash /usr/bin/osascript -e ‘tell application “Messages” send “I need to go home late. Love you.” to buddy “+84988999888” of (service 1 whose service type is iMessage) end tell’ echo “Let go buddy”

/usr/bin/osascript -e ‘tell application “Messages”

send “I need to go home late. Love you.” to buddy “+84988999888” of (service 1 whose service type is iMessage)

2. Get it executable, and run at 18:30 every day.

MacBook-Pro:twilio tom$ chmod 775 MacBook-Pro:twilio hien$ vi /etc/crontab

MacBook-Pro:twilio tom$ chmod 775

MacBook-Pro:twilio tom$ vi /etc/crontab

Add this line, correct your file path, 18, 30 is the hour and minute triggers this bash script.

30 18 * * * ~/Desktop/

30 18 * * * ~/Desktop/

3. Save this file and add to cronjob. That’s all.

MacBook-Pro:twilio hien$ crontab /etc/crontab

MacBook-Pro:twilio hien$ crontab /etc/crontab

Life is easy if you are a programmer. Have a look at the fun they have here!

Related posts

In this article, we will examine the best approaches for ReactJS state management and demonstrate how to maintain control over the state of your application. We shall see how ReactJS allows us to make a highly functionable app that benefits us to achieve our goals.
5 min read
In a space where the environment is filled with of relational databases, where data volumes are ever-expanding, the efficiency of SQL queries plays a pivotal role in maintaining optimal performance. One of the key elements in achieving this optimization is the strategic use of indexes. In this blog post, we will engage with advanced indexing strategies in SQL, exploring techniques that go beyond the basics
3 min read
Vue.js, a force in contemporary front-end development, presents an ideal mix of ease and capability. Join us as we unveil its essential principles, explore reactive data-binding, and navigate the creation of dynamic user interfaces with ease. Whether you're an experienced developer or new to coding, Vue.js calls out, assuring a smooth progression from simplicity to scalability. Let's explore the enchantment of Vue.js collectively and enhance
6 min read