Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows 7 automatic job start

Status
Not open for further replies.

Ali147gta

Technical User
Apr 21, 2003
229
0
0
GB
Hi,
I'm configuring a scheduled task to start windows backup only when a PC logins to the domain. All works apart from when I login it will only actually start the backup and restore program it still waits for the backup now button to be pressed. Is there anyway to automate this so it just runs ?

Thanks in advance !!

iMachiavellian - think dissident
 
are you just backing up data, or creating images and data backup...?

if you are just backing up data, e.g. from a stored location (My Documents, USER Profile, etc.), then I would suggest instead use ROBOCOPY, it's quite configurable using switches, and gets the job done...

see:

Use Robocopy's multi-threaded feature to quickly back up your data in Windows 7

or use Wbadmin start backup as the caller to the back-up task...


Ben
"If it works don't fix it! If it doesn't use a sledgehammer..."
How to ask a question, when posting them to a professional forum.
Only ask questions with yes/no answers if you want "yes" or "no"
 
I use Robocopy quite a bit for simple data copies or mirroring folders to external hard drives and other storage. It's simple for users to click on a batch file after they plug in a device OR schedule the batch file.

Here is a script for multiple sources going to separate destinations (you have to do that if you mirror) and a separate backup log for each backup. The first job will run until complete and then the second will start - all in the same CMD window.

start /wait /b "Job 1" robocopy.exe c:\DataFolder1 \\computer\backup\folder1 /MIR /ZB /R:2 /W:5 /LOG:"c:\backup1.log"
start /wait /b "Job 2" robocopy.exe c:\DataFolder2 \\computer\backup\folder2 /MIR /ZB /R:2 /W:5 /LOG:"c:\backup2.log"
 
Thanks for the advice.

Client want's it fully automated so that the end user doesnt have to click anything and for it to only run when the laptop is connected to the network

Mad, Windows Backup lets you only run a backup when the network connection is present but wont actually automatically start

Hmmmm

Thanks both for the info but Robocopy is a no go.

iMachiavellian - think dissident
 
I must be missing something and I quote you:

"Client want's it fully automated so that the end user doesnt have to click anything" - a scheduled task solves that, with any backup software.

"And for it to only run when the laptop is connected to the network" - does it matter if it tries to run and the laptop is not connected??? It will fail and close and try again another day. If the user is NEVER there, no backup is going to work.
 
Windows seven backup is configured to only launch when it detects the network connection is available.

the scheduled task that calls microsot.backupandrestore does indeed launch the app in question but does not start the backup ie it waits for you press the backup now button what i want to happen is when the backup app opens it starts automatically and does not prompt for user interaction.

Sorry if i didnt make myself clear

iMachiavellian - think dissident
 
And as an update, MS has a new version of Robocopy called RichCopy. It has a beyyer GUI, supports threaded backups, can be run from a command line, etc. Just thought I'd throw my 2 cents in. (google richcopy for download info as well as help, etc)
 
Why couldn't you do a statement in the batch file that contains the robocopy, something like this (unsure of exact syntax at the moment)

if exist mapped drive X: then point to robocopy
else exit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top