* * * * *
| | | | |
| | | | +-- Day of week (0-7, where 0 and 7 = Sunday)
| | | +---- Month
| | +------ Day of month
| +-------- Hour
+---------- Minute
Create an *.sh script file.
~/break-reminder.sh
Add the osascript to the file.
#!/bin/bash
osascript -e 'display notification "β° Time to take a break!" with title "π
Break Reminder"'
Modify file access permissions. Make it executable.
chmod +x ~/break-reminder.sh whoami
write in crontab file - crontab -e
# Break reminder every hour from 6 AM to 10 PM
0 10-16 * * * /Users/<username>/bin/break-reminder.sh
list crontab jobs - crontab -l
# Break reminder every hour from 10 AM to 04 PM
0 10-16 * * 1-5 /Users/<username>/break-reminder.sh