Solved

Scheduling an exe (emoreau's example)

Posted on 2013-01-07
5
206 Views
Last Modified: 2013-01-08
I've followed this code

http://emoreau.com/Entries/Articles/2008/11/Passing-arguments-to-an-application-startup.aspx

Method 2 of that link. I compiled and have an exe. I want to schedule it as a Service. Per that article, I need to pass a paramter '/batch' to have it run as a service...

When I'm in debug, I add the command line argument to "Debug" tab of properties. When I want to schedule the exe...where do I need to put the command line argument?

Thanks
0
Comment
Question by:Camillia
[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
  • 2
  • 2
5 Comments
 
LVL 17

Assisted Solution

by:Kent Dyer
Kent Dyer earned 250 total points
ID: 38752551
Depends on where you are running the scheduled task..

Windows XP or 2000/2003 would take the switch on the same command line..

I think Windows 2008 has a place for parameters..
Same with Task Scheduler Professional..

Have a look at SCHTASKS.exe to set this up...
http://ss64.com/nt/schtasks.html

HTH,

Kent
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 38753196
are you creating your task manually in the Windows "Task Scheduler"? If so, you can add your argument to name of the exe.

or you can create a batch file with that argument and launch the batch in the task
0
 
LVL 7

Author Comment

by:Camillia
ID: 38753202
I think I will use Windows Task Scheduler. I've never done this before tho. What do you mean adding it to the name of the exe?  I know if I right click on the exe, select "properties", there's a "Target" field and I can add the paramter to end of it. Is this what you mean?
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 250 total points
ID: 38753210
the task scheduler screens varies according to the version of windows you are using

whatever the version your are using, there is a place where you set the full path of your exe. you can add /batch at the end
0
 
LVL 7

Author Comment

by:Camillia
ID: 38753225
i will look. I will keep this question open for now. Thanks for your help.
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

696 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