General discussion

Locked

Help with scheduled tasks

By kylegeldmaker ·
Hello.
I have written a backup script that will take data off the workstations and write it to our file/print server. It basically takes the my documents folder, desktop, and some other folders that the employees need. In the script I put a line that tells the script to log the date, time, and machine name of the computer, that way I can tell who is doing their backups. Well needless to say only a hand full of people are double clicking the batch file before they leave. So it's not really getting done. I have a few test computers that I have done a scheduled task to run the batc file but it does not seem to be running. I can click the task and run it, but when I check the log file it hasn't written the date, time and machine name. Also, it doesn't appear in the task manager when running. I have the task set to run with my username and password because the users do not have priveledges to run scheduled tasks (apparently). So it's set up to start in the users home directory but using my password. Does that mean the task is running as me? Eventhough the Start In field designates that particular user?

Anyone know of a better way to schedule these backups so that I dont have to go in every 30 days and change the password and so that the users don't actually have to click anything?
Thanks for your help, I have been working at this for about a week and I would really like to get this working. Thanks agian.

This conversation is currently closed to new comments.

8 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Create a user account to run workstation scripts

by faradhi In reply to Help with scheduled tasks

I would create a user account with a very strong password. (10-12 characters long with upper and lower case letters, symbols and numbers.) Then set the account to have the password never expire.

I would then use this new account to run the script.

Collapse -

That's what my thoughts were

by kylegeldmaker In reply to Create a user account to ...

I was thinking about creating a script user. But the problem is mu CSO is having difficulty understanding that I need an administrator account that has a password that never expires. He doesn't think that the backups are as important as security. To some extent I agree. That is only half the the problem though. I still can't get the task to write to the log files. Does this have to do with the user? If I run the task on my computer it will write to the log?
What If I write %username% in the task for the user would that work?
If I do create the script user, will it run the task in from the current users directories? I have machines that the users stay logged in all the time, they are QA people. They don't have password on the machines because they keep locking themselves out. Plus they arent really on the network (meaning no Internet). They are on a separate switch that I have access to. If I run the task as ScriptUser will it backup the data from the 047User's directories?

Collapse -

Ok, try this with your CSO.

by faradhi In reply to That's what my thoughts w ...

In this case, I do not think the user has to be a domain admin. Make it a Domain user account with full rights to the backup location. (Or even make the user a backup operator.) Make the user a local Admin on the machine that will be backed up. This will give the user access to every file on the machine. (This should take care of your logging issue.)

As for the security issue. The risk in minimal. If your CSO will not allow a new account, there are most likely accounts that run services on diffrent servers. Depending on your backup software, there is probably a backup user account with domain admin rights already. Use that account.

Also, I would ask the CSO if he does not consider the disaster recovery plan a security issue. IMHO business continuation is just as important as Security.

I hope this helps.

Bry

Collapse -

Re: Help with scheduled task

by Automation Experts In reply to Help with scheduled tasks

How did you add scheduled task in all computers?
Scheduled task is picky about that. You have to schedule task using same account as what you are logged in as at that time.

Expert Services Group, Tethys Solutions
http://www.tethyssolutions.com/ask-the-expert.htm
SMART Macro & Automation Software

Collapse -

THat is just not true

by faradhi In reply to Re: Help with scheduled t ...

You can set a task to run as any user.

Collapse -

How??

by kylegeldmaker In reply to THat is just not true

It definately seems possible to set the tasks to run for any user. It just does not seem to work. If I run the batch file it will work fine. If I run the sched. task for the batch file, nothing. It won't do anything.
This is really getting annoying. It's so simple, yet still not working.
I wont even get in to my most recent endeavor with batch files involving the "CALL" command.

Collapse -

I am not sure why you are having a problem

by faradhi In reply to How??

I just tested running a batch file as a scheduled task. It worked fine. I used the task scheduler. Run it under a user that has administrator rights to the local machine and the file backup location. It should work fine.

Collapse -

Would this work?

by kylegeldmaker In reply to I am not sure why you are ...

Is there a way to specify a user in the batch file? Like a "Run As" type deal.
I also thought about just running it on the local admin account instead of using a domain admin account. I don't really get it because it works fine on my machine, just nobody elses.

Back to Networks Forum
8 total posts (Page 1 of 1)  

Related Discussions

Related Forums