Solved

How to run an C# application as an schedule Task

Posted on 2015-02-03
4
113 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 500 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 35

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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
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…

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