Protecting your data by backing up your system is an essential but sometimes forgotten task. Luckily Apple makes it straightforward to do this with the Time Machine application, which allows you to easily enable regularly scheduled backups.
Initial setup isn’t complicated, but if you find you need to adjust the schedule of the backups, it is not really obvious how to do it, and there are not many options available.
Some other ways to adjust it include setting up a cron job using Terminal or using a third-party application that can run it on a schedule you choose.
My Name is Eric, and I am a computer enthusiast, and software engineer. I love finding ways to configure computers to run more efficiently, and being able to create your own backup schedule can be important for several reasons.
If you want to see the methods I have discovered for doing this, keep reading, and I will show you what I have learned.
- Changing the Backup Schedule
- Configure Time Machine Schedule
- Step 1: Open System Settings.
- Step 2: Select General and then Time Machine.
- Step 3: Select Options on the Time Machine screen.
- Step 4: On the Options screen click on the Back up frequency dropdown.
- Step 4: Select the frequency option you want to use.
- Step 5: Once you have selected the frequency, click the Done button.
- Use Cron to Schedule your Backups
- Use a Third-party Application
Changing the Backup Schedule
Changing the Backup schedule in TimeMachine seems like it would be a fairly simple process. In my opinion, it should be, but for some reason, Time Machine does not provide many options for scheduling backups.
If you have already tried this, you have seen that the only options are to schedule Time Machine to run manually, hourly, daily, or weekly.
If you choose hourly, daily, or weekly from the selection above, the backup will start running as soon as you enable this and continue at the frequency you select every hour, day, or week. For example, if it is 8:05 and you choose hourly, it will run at 9:05, 10:05, 11:05, and so on.
If you choose to run daily, it will run at 8:05 each day. If weekly is selected, it will run on that same day every week at 8:05. These basic selections can work great for some, and as long as you enable it at the time you want it to run, you have some control over it.
Some users may require more options for when and how often Time Machine runs backups. For example, you might want to run them twice a day, or you may want to run them 3 or 4 times a week, and you may want to run them at times when you are not busy using your computer.
Although Time Machine does not inherently provide this configuration, there are a couple of methods you can use that will give you much more flexibility in scheduling your backups.
Let’s first go through the basic configuration of Time Machine, and then we can look at some of the other methods.
Configure Time Machine Schedule
If the settings available in Time Machine are adequate for your backup requirements, you can easily set up a basic schedule using its settings. To do this, you will want to set it up at the particular time and/or day you want it to run each time.
When you are ready to do this, you can use the following steps.
(Note: These steps are from the latest Ventura macOS but may be slightly different if you use an earlier macOS version.)
Step 1: Open System Settings.
Click on the Apple symbol in the upper left corner of the screen and select System Settings.
Step 2: Select General and then Time Machine.
Step 3: Select Options on the Time Machine screen.
Step 4: On the Options screen click on the Back up frequency dropdown.
Step 4: Select the frequency option you want to use.
Use Cron to Schedule your Backups
If you want complete control over when your backups run and how often, a cron job might be the way to go. Cron is a UNIX/LINUX command or utility that allows you to schedule jobs (commands, scripts, applications, etc.) to be run at specific times down to the minute.
You can set up cron jobs using your Mac’s Terminal application. It may sound a bit scary at first, but once you get the hang of the cron format, it is a relatively simple thing to do. I will cover how to do this briefly, but there is an excellent video if you want to learn more about using cron.
The idea is to use the tmutil startbackup command to start a backup from the command line. Since crontab allows us to run a command like tmutil startbackup at any time we want, we can set it to run this command on a schedule that we come up with.
To use crontab we need to place a command in the crontab file that specifies when this command will run followed by the actual command. The command in crontab has the following format.
* * * * * <command to run>
In our case <command to run> is tmutil startbackup. The 5 stars at the beginning of the line represent the time parameters, and if left as a * it will run for every interval of that parameter.
So if you leave all the parameters as stars, it will run every minute of every hour of every month and every day of the week. Look at the image below to see the time parameter each * represents.
If I wanted to run my backup every day at 12:30, the command would look like this:
30 12 * * * tmutil startbackup
This can get more complicated if we want to add more times and specific days. For example, if I want it to run at 12:30 and 8:30 on Mondays, Wednesdays, and Fridays, The command would be:
30 12,20 * * 1,3,5 tmutil startbackup
As you can see, there are many ways to set this up, and I won’t dig into this part any deeper. I highly suggest it if you decide to use this method and are not already familiar with cron.
Scheduling your Job in Crontab
Once you have figured out your schedule and know how to format it with your command, you will need to enter it into crontab. This is done with the crontab -e command, which will open the crontab file in an editor.
By default, your system will open it with the vi editor. For some, this may be ok, but if you prefer to open it with another editor such as nano, you can do so by specifying the editor in the crontab command as shown below.
VISUAL=nano crontab -e
I will use nano in the example below just to make things a bit easier, but if you prefer to use vi, you can just leave the VISUAL=nano part out of the command.
Make sure that Time Machine’s backup frequency is set to Manually. You can use the steps in the previous section to verify and/or change this if needed. Then follow the steps below to schedule a backup using crontab.
Step 1: Open Terminal.
Use whatever method you prefer to start up the Terminal application.
Step 2: Open the crontab file using the crontrab command.
The -e parameter stands for edit and allows you to edit the crontab file.
VISUAL=nano crontab -e
Step 3: Enter the cron job.
For my example, I will create a schedule that runs a backup twice daily at 7:00 am and 6:00 pm. You can come up with any schedule you would like as long as you figure out how to format it for crontab. The command for my example will look like the following.
0 7,18 * * * tmutil startbackup
Type the above command or copy and paste it into the nano editor window you just started up in the previous step.
Step 4: Save and close the file.
Once you have pasted the command into the editor, you will then need to save and exit nano. Hit CONTROL+O to save the file and then CONTROL+X to exit.
Step 5: Confirm the change.
You will be asked to confirm the administrative change. Click on OK to confirm.
Your backup will now be scheduled. Keep in mind that you will not see a Next backup scheduled in the Time Machine settings. This is because we are actually running the backup manually; it’s just that crontab will be running it on its schedule, and the Time Machine utility does not know about that.
You can verify that your backup ran by waiting until after the scheduled time, and once the backup has completed, you should see it in Time Machine or even in the Time Machine settings where it shows the Last backup.
Use a Third-party Application
Suppose Time Machine’s options don’t provide enough flexibility for you, and you don’t want to get into creating your own cron jobs. In that case, there is another option available, and that is to use a third-party application.
Some applications available schedule your backups with the same type of flexibility as the cron method shown above. In fact, many of them use cron or a similar tool to do so, but you are provided with a graphical user interface on your desktop to make it easier to work with.
Some tools are specific to scheduling backups, and others allow you to schedule any type of script or activity you might want to run regularly. Search for backup scheduler or scheduler in the app store and take a look at what is available.
Below are a few questions that are often asked about changing Time Machine’s backup schedule.
Why do I need a flexible schedule?
For some, it may not matter, but for others, it can be a big deal when backups run. If you do most of your work at certain times, you may want to ensure it gets backed up after you are done.
Also, the backup process can use quite a bit of processing power, so you may not want it running when you are busy using your computer to do other work.
How often should I back up?
This all depends on your usage and preference. Suppose you make many changes to your data or system; you may want to back up frequently. If not, and you save everything in the cloud, you might be ok with very infrequent backups.
Will Crontab work when my computer is turned off?
No. When your computer is shut down or even asleep, crontab will not run your backups. This is true even for those scheduled with Time Machine itself. The computer must be running to do a backup. If one is missed while it is off, it will try to do it as soon as you turn it on.
Is there a way to view the current cron jobs that are scheduled?
Yes. If you just want to see what is scheduled in crontab, you can use the -l parameter instead of the -e. Use the command as shown below.
Adjusting your Mac’s Time Machine backup schedule can be important for many users. Time Machine does provide some very basic settings to do this, but if you want absolute control over backup times, you will need to use crontab or a third party to get more options.
How do you run your Time Machine backups? Let me know if you have any questions or comments. I would love to hear from you!