c# - How to identify the whether process is started manually or from Task Scheduler? -


i have win form application generates pdf files. have create task in scheduler run application on every day on specified time. have is, need run application manually. while running manually need show results user. how can identify application run scheduler or manually?

here go

  1. go properties of project set command line arguments. knowing manually (set both release , debug) enter image description here

  2. now go task scheduler , set parameters given below enter image description here

  3. now when runs exe or scheduler argument come parameter

    code sample

    static void main(string[] args) {     console.writeline(args[0]); } 

Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -