delphi application run procedure then application exit
within my application i have several buttons of which each of them export data from a local mdb and populate tables in a remote mysql database.
i am after trying to create a scheduled task to run my program in the early hours. so require the app to open then button1.click; button2.click; then completely exit the application untill it runs next.
i have tried several different methods within the OnCreate and although my form loads but not visible untill the procedures complete i am ok with this but its the exiting which is the problem.
could i have a couple of ideas of how to perform this best (i was going to question how to create sceduled task with parameters) but i think this may get long winded i.e myapp.exe -'export' but i think that will require more indepth research