Solved

bat file in task scheduler.

Posted on 2013-11-22
8
468 Views
Last Modified: 2013-12-05
I am trying to run simple bat file in windows task scheduler and it is not running.
This is what I did in the action box
Pointed to c:\myfile\test.bat, but this file runs when I double click on desktop.
0
Comment
Question by:sara2000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 15

Expert Comment

by:Jaroslav Mraz
ID: 39669363
There are usualy few problems.

1. Something bad in transer to cmd. There usualy help when you change extention from bat tu cmd

2. You are trying to do something withou coresponding user rights. Try to setu user with runing script admin no systemaccount.

3. Setup arguments in sheduler and work directory c:/myfile/

<competing site link removed - GaryC13>
0
 

Author Comment

by:sara2000
ID: 39669464
it has admin user right.
0
 
LVL 15

Expert Comment

by:Jaroslav Mraz
ID: 39669614
Ok

Then action is start a program


In program/script write only test.bat

And in optional start in write c:\myfile\
0
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

 
LVL 12

Expert Comment

by:ktaczala
ID: 39671364
how did you add it to task manager?  through the GUI or from command line?
if from the GUI then the user that you created under must be logged in.
set it from the command line. (then it runs with administrative permission, no matter who is logged in or even if noone is logged in.)
cmd prompt with elevated privileges
c:\> at 22:00 /every:m,t,w,th,f c:\myfile\test.bat

here's a link for the command line formatting of the at command:
http://support.microsoft.com/kb/313565
0
 
LVL 55

Expert Comment

by:McKnife
ID: 39675652
Sara, what makes you think it does not run?
Task Scheduler does not run programs interactively unless we set it up to "only run when the user is logged on" - if we don't select that, it will run, but invisible.
Could you make sure it does not run invisible?
0
 

Author Comment

by:sara2000
ID: 39676573
McKnife:
Here is my simple bat file for snapdrive schedule. if the schedule runs then there should be an snapshot, I do not see the snapshot.
I know that comand runs when I am in comand prompt .

@echo off
sdcli snap create -s %computername%_%date:~4,2%_%date:~7,2%_%date:~12,2%_%time:~0,2%
0
 
LVL 15

Expert Comment

by:Jaroslav Mraz
ID: 39676755
You shoud use quota "%computername%_%date:~4,2%_%date:~7,2%_%date:~12,2%_%time:~0"
0
 
LVL 55

Accepted Solution

by:
McKnife earned 500 total points
ID: 39676869
Could it be it needs elevated rights? If so, try to check the box next to "run with highest privileges" in the task properties.
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
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…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

729 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