I have a console .exe file. Two windows scheduled tasks are created for the same .exe file with two different command line arguments for each. These tasks run in parallel. I've a variable which should be shared b/w these two tasks i.e. if the variable is initialized in a task, the second task should use the same value without initialzing it again. I've tried implementing singleton pattern, but it didn't work.