Solved

MS Task Scheduler (0x1)

Posted on 2014-04-28
10
3,785 Views
Last Modified: 2014-05-10
I think I have tried everything, but I still get a task that won't work.  All I want to do is move a file from one directory to another via running a .bat file

Here is what I have tried.  - Made sure user (domain\administrator) has logon as batch rights, run whether user is logged on or not, run with highest privileges,  on ACTION tab I put the path in additional arguments instead of programs, and made sure the user has all privileges to the folders involved.

The task will from the cmd prompt.

I do not understand why if I run this as an admin that I should have any privilege problems?

Program is running on a virtual server. (Windows Server 2008R2, Management Console 3.0, Version 6.1)

Does anyone have any other suggestions?
Thanks,
Cindy
0
Comment
Question by:vdixon79
  • 6
  • 3
10 Comments
 
LVL 37

Expert Comment

by:bbao
ID: 40027311
are you using MOVE or COPY command to move the files under command prompt?

if yes, at Task Scheduler's command field, you need to run Windows Command Shell to invoke the MOVE or COPY commands as the commands are Shell Commands, not standalone executables.

what you should input look like this: CMD.EXE /C MOVE Pathname1 Pathname2
0
 

Expert Comment

by:jdouthit
ID: 40028153
You may need to fill in the "start in" field with the folder location of the batch file.
0
 

Author Comment

by:vdixon79
ID: 40028175
YES, I have a copy and then delete. I also tried move.

It still doesn't work using CMD.EXE

I have the same syntax code in another .bat file and it runs great.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 37

Expert Comment

by:bbao
ID: 40028528
so what exactly did you input in the command field of Task Scheduler? just a BAT file name?
0
 

Author Comment

by:vdixon79
ID: 40030177
Here is entire BAT file

CMD.EXE /C MOVE "C:\Program Files (x86)\TMW Systems, Inc\PCATSORDERIMPORT\FailedXML\*.*" "C:\Program Files (x86)\TMW Systems, Inc\PCATSORDERIMPORT\FAILED and not processed2"

exit

Here is ACTION tab on Task Scheduler

Program Script = OrderFailedMove.bat
Start in = C:\Program Files (x86)\TMW Systems, Inc\PCATSORDERMPORT\BAT file to move files from failed to failed not processed\
0
 
LVL 37

Accepted Solution

by:
bbao earned 400 total points
ID: 40030313
"CMD.EXE /C" is not necessary in the BAT file.

but you do need to put "CMD.EXE /C" at the beginning of Program Script.
0
 

Author Comment

by:vdixon79
ID: 40037490
I am sorry but can you tell me what to put in each line of the task scheduler.

Here is what I have tried and the task will not even run - directory invalid.

Program script = cmd.exe

Arguments = /C "C:\Program Files (x86)\TMW Systems, Inc\PCATSORDERMPORT\BAT file to move files from failed to failed not processed\OrderFailedMove.bat"

Start in = C:\Windows\System32\
0
 

Author Comment

by:vdixon79
ID: 40041957
Now I get a 0x1 error when I do this.  (I moved the bat file)

Program script:

"C:\Windows\System32\CMD32.EXE /K OrderFailedMove.bat"

Any insight into the combination that works for program script, arguments, and start in would be appreciated.
0
 

Assisted Solution

by:vdixon79
vdixon79 earned 0 total points
ID: 40041967
I just got it to work:


Program script:

"C:\Windows\System32\CMD.EXE /K OrderFailedMove.bat"
0
 

Author Closing Comment

by:vdixon79
ID: 40055663
bbao gave me the information I needed to get the final program script to work
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Creating a tuition video for users 2 89
Abstract this sub 6 68
Phone number for Microsoft server activation issues 3 55
cron.exe SCOM alert 3 51
Every once-in-a-while, when you try to add a XenServer host to the System Center Virtual Machine Manager console, it will generate a certificate error, and the XenServer host will not be added to Virtual Machine Manager: If you are experiencing t…
As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question