Aller au contenu principal

Questions re:BackUp jobs via Windows Task Scheduler

Thread needs solution

I have a two part question for someone with experience setting up tasks in Windows Task Scheduler (perhaps Mark - K0LO).

First, the setup:
Because of being away from my computer quite a bit, not wishing to leave it powered on during my absence, I am setting up Windows Task Scheduler to wake my system from sleep, run Acronis backup, send email, and power off the system (Windows shutdown command via bat file). This all works very nicely, but I have the two questions.

1.> The email notice I had to do via a .bat file, because I have not been able to make the email task in Windows Task Scheduler work, as described by K0LO in step 28c of Grover's "Index of the Accumulated Wisdom". I have tried every combination of entries I can think of on the email job screen in Windows Task Scheduler, and no email appears. Although my .bat file works well, it would be nice to keep all functions 'in house' in Task Scheduler if possible. Also, learning how to make that work will benefit me in later projects!!.

2.> Although the end result is perfect using my methods (backup done and validated, email notification sent, system shutdown) the status shown in Win Task Scheduler is (0x1), which is a code for 'incorrect or unknown function'. If I include ONLY the Acronis backup task, the status is 'the operation completed successfully (0x0)'. However, adding either or both of the .bat functions results in the (0x1) status. Although I get the desired overall result, I would like to understand the status indication, again to benefit me in later project design.

Win7 64bit, Acronis TI2010 bld5055, backups go to 1TB external eSATA. First experience using Windows Task Scheduler, and trying to learn it better!!

Thanks for any thoughts and guidance from anyone.

Bob

0 Users found this helpful

Most likely, K0lo and others may respond. Here is one link on using Windows Task Scheduler. There are also some links inside that posting.

http://forum.acronis.com/forum/8500

Bob:

1) Task Scheduler has only the most basic support for sending email. It can only send to SMTP servers on port 25, and there are no provisions for sending login information to the SMTP server. With my ISP, for example, they now require email clients to send the login name and password along with sent messages (on an email client this is sometimes called My outgoing server requires authentication). If your ISP has a similar requirement then Task Scheduler will be unable to send email.

If your ISP does allow unauthenticated email transmissions to their SMTP server then the settings would be as shown below. Note that the To and From boxes are to be email addresses; not names.

2) I'm not sure why the task returns (0x1) if a batch file is included. Does it return this value if any batch file is included, or just your particular batch file(s)? Try removing your batch files from the task and add the following one-line batch file that pings your own PC to see if you still get the (0x1) return:

ping localhost

I just ran this on my machine and it returned (0x0) when completed.

Fichier attaché Taille
21844-87787.PNG 35.3 Ko

Mark, thanks for the reply.

1.) Yes, my SMTP server does indeed require authentication, so that answers that!! However, as I said in the first post, I am able to sent a email notification via a .bat file, including the date and time the Acronis backup was executed. The only thing missing that would have been included in an Acronis generated notification is the run log. I am happy to understand why the task scheduler method didn't work. Thank you for that!

2.) In playing with the suggestion you made, I discovered the cause of my (0x1) error!! It was, as my son the pilot would say, "cockpit error". I was ending my .bat files with a "end" statement -- DON'T ASK ME WHERE MY MIND COME UP WITH THAT!!! I changed that to a "exit" statement, and all works perfect, with a (0x0) status!

As always, thank you much for sharing your expertise. I may be back for more!!!

Bob