Scheduling Your Backup Script to run Regularly

In the previous section titled Automating the Backup Process I walked you through how to
create a simple script which automated all the steps required in the Making your First Backup
section. The only problem remaining is that we actually still need to launch the backup script
manually for the backup to occur.

Thanks to the built in scheduling software in Windows, I will walk you through the steps on how
to select the script you already have and have Windows run it for you each day, without any
intervention from you :) To automate the execution of the backup script on a daily basis, simply
follow the steps below :
Click Start - All Programs -
Accessories - Systems Tools
-
Scheduled Tasks
In the Scheduled Tasks Window,
double click the
Add Scheduled
Tasks
to begin the Scheduled
Task Wizard
Click Next on the Schedule
Tasks Wizard Welcome Screen
Click Browse
In the Select program to schedule
window, type
c:\scripts in the file
name field and click
Open
Click the Backup file that now
displays at the top of the window
and click
Open
Choose Daily and click Next
Choose a Start Time and Start
Date
to begin the first automated
scheduled task and click
Next
Enter a username and
password to identify the
account the backup process
will run as and click
Next
Note the format in the username field. The format is ComputerName\Username. By default, the
Scheduled Tasks Wizard populates this field with whatever username is currently logged in.
The wizard, inserts the computer name (in this case PC) along with a backslash and then adds
the currently logged in username name. You can of course change this. For example if you
already created a user account with the correct permissions and the name was BackupUser,
you simply enter in BackupUser in the user name field. The computer name (along with the
backslash) is optional and if the user name exists on the currently computer you can ignore
entering it.
Click Finish to complete the
process.
Troubleshooting Adding a Task
Depending on your operating system patch level and how you have your PC configured, you
may run into the following error screen when you click
Next after supplying your username and
password. Typically this error is caused by supplying a user account which does not have a
password associated with it. In order to automate scripts and processes, all user accounts
need to have a password assigned to them. To get around this error, simply ensure the account
you wish to use for your backup process has a password associated with it.
You are now ready to test it, by invoking the scheduled task to run. Single click the task
named backup
from the tasks list, then click File and click Run If all went well the backup
process will begin. You can cancel it if you wish or you can let it run through. Assuming the
backup process began when you attempted to run the tasks manually, the scheduled task
should start at the time you supplied for the task.
Assigning a Password to a User Account
Click Start - Run. In the Open dialog
box, type
control userpasswords
and click
OK
Locate and click on the
username
you wish to assign a
password to (In my example, I will
be assigning a password to the

Student
user).
Click on Create a Password.
Enter in your new password
then
retype the password for
confirmation. Click
Create
password
Click No when asked to make your
files private.
That is it! If everything went as it should have, you should now have an account with a valid
password assigned to it.

Please note that if you choose to use the account normally used to access your computer, you
will now be prompted to enter in that password each and every time you turn in your PC.
Modifying Backup Task with new User Account Password
Now that a password has been assigned to the user account, we need to go back to the
scheduled task we created and assign the newly created password to the backup tasks. If you
have accidentally closed down the Scheduled Tasks window, you can return to it by doing the
following :

Click
Start - All Programs - Accessories - Systems Tools - Scheduled Tasks
You should see a single task there named
backup.
Single click the task named
backup
and then click File and click
Properties
Click Set Password
Type in the new password, and then
retype in the password for confirmation
and click
OK
Click OK again to exit the backup
properties box
Once you have resubmitted the job with the new account password information, you can go
back to the steps above prior to the Troubleshooting section where I outline how to manually
execute the backup to ensure it functions properly
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)
(16)
(17)
(18)
(19)
(20)
(21)
Copyright by darkchip.com