A way to set up automations in macOS in an easy way

While working on my new website, I had a simple need.

I was storing data in a SQLite database and I want to back it up once a day, while I’m working on it locally during development.

SQLite is great because it’s just a file. It&r…


This content originally appeared on flaviocopes.com and was authored by flaviocopes.com

While working on my new website, I had a simple need.

I was storing data in a SQLite database and I want to back it up once a day, while I’m working on it locally during development.

SQLite is great because it’s just a file. It’s not “somewhere on your computer” or “somewhere on a server” but you’re not really sure how.

So to back it up, you simply copy the file to a backup folder and that’s it.

I did this manually for some time but I also wanted to make this automatic to free my mind, and I wanted to avoid using cron jobs and shell scripts which I then tend to forget, and this was just a temporary thing after all, only for a couple weeks.

Not worth setting up a while cron and bash script automation

So the first thing I thought was Automator. Probably the most under appreciated app on the Mac.

I use it all the time, to do little things like changing image formats and sizes.

I created an Application in Automator:

and I set it up like this, to get the file I wanted to back up, copy it to a backups folder, and add the date and time:

and I saved it as a backup.app.

Then I opened the calendar and in alert I set it to open this file.

and I set it to repeat every day.

I added it to a Automations calendar so I know where all may automations are, and I also know where to disable them.

Then I then set that whole calendar to be hidden to avoid cluttering my normal calendar view:

The only problem with this is that now the Mac will alert me with those events.

Setting “Ignore alerts” on the specific calendar didn’t work as the file that makes the backup was not called (which makes sense, since it’s set up as an alert).

I don’t know, it’s a way to do things, but not something you want for the long term. I just described how I did it.

Now with Shortcuts on macOS Monterey this might be even easier, not sure I haven’t tried it yet.


This content originally appeared on flaviocopes.com and was authored by flaviocopes.com


Print Share Comment Cite Upload Translate Updates
APA

flaviocopes.com | Sciencx (2021-10-31T05:00:00+00:00) A way to set up automations in macOS in an easy way. Retrieved from https://www.scien.cx/2021/10/31/a-way-to-set-up-automations-in-macos-in-an-easy-way/

MLA
" » A way to set up automations in macOS in an easy way." flaviocopes.com | Sciencx - Sunday October 31, 2021, https://www.scien.cx/2021/10/31/a-way-to-set-up-automations-in-macos-in-an-easy-way/
HARVARD
flaviocopes.com | Sciencx Sunday October 31, 2021 » A way to set up automations in macOS in an easy way., viewed ,<https://www.scien.cx/2021/10/31/a-way-to-set-up-automations-in-macos-in-an-easy-way/>
VANCOUVER
flaviocopes.com | Sciencx - » A way to set up automations in macOS in an easy way. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/10/31/a-way-to-set-up-automations-in-macos-in-an-easy-way/
CHICAGO
" » A way to set up automations in macOS in an easy way." flaviocopes.com | Sciencx - Accessed . https://www.scien.cx/2021/10/31/a-way-to-set-up-automations-in-macos-in-an-easy-way/
IEEE
" » A way to set up automations in macOS in an easy way." flaviocopes.com | Sciencx [Online]. Available: https://www.scien.cx/2021/10/31/a-way-to-set-up-automations-in-macos-in-an-easy-way/. [Accessed: ]
rf:citation
» A way to set up automations in macOS in an easy way | flaviocopes.com | Sciencx | https://www.scien.cx/2021/10/31/a-way-to-set-up-automations-in-macos-in-an-easy-way/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.