?
Solved

How to run an C# application as an schedule Task

Posted on 2015-02-03
4
Medium Priority
?
117 Views
Last Modified: 2015-02-18
I have an C# application that is ran daily at 8:00am, where the user has to click the Run Gain Loss button on the form. I've attached a screenshot of the form. I'm looking for a solution where the application would run and the Run Gain Loss button is click automatically daily at 8:00am. I know I can setup a scheduled task to run the C# application at 8:00am but how do I execute the Run Gain Loss button? Any ideals on how I can get this application to run automatically, maybe some 3rd party software to click the Run Gain Loss button. Again, any ideals would much appeciated.

Thanks in Advance
0
Comment
Question by:gilweber3
[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
4 Comments
 
LVL 17

Accepted Solution

by:
OriNetworks earned 1500 total points
ID: 40586764
If you don't have the ability to call an API within the software then there are automation frameworks such as AutoIt https://www.autoitscript.com/site/autoit/
0
 
LVL 36

Expert Comment

by:Kimputer
ID: 40586786
Usually I use AutoHotkey for these things. Please note the caveat, the screen has to be on and logged in. Therefore, it's better to get it running without the button (will take the original developer 4 seconds of work), that way the job always runs (even when you're not logged on)
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 40586979
I wouldn't rely on something to click a button. What if you redesign and the button moves? It will stop working.

Instead, have the code behind the button callable from elsewhere then the button and pass a parameter to your application to run your new method.

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

Expert Comment

by:Mike Tomlinson
ID: 40587010
Do you have the source code for this application?  That's not clear from the description.  If yes, then I'd go with Eric's suggestion and pass a parameter to the app so you 'll know to run the code associated with the button click.

Depending on what the app does, it might be possible to re-design it so all the work gets done from within program.cs without ever showing a form.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

800 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