Using one exe for different scheduled tasks

In the current project, I use the task scheduler to launch a console application to perform some daily operations. Now I’m thinking of using the same console application for another operation that should run every 15 minutes. To define the operation in the same console application, I plan to use different arguments. eg.

MyProject.Services.exe "RunDailyTask"

MyProject.Services.exe "RunEvery15MinutesTask"

Thus, both schedulers will call the same exe, but with different arguments to form different operations.

My question is: would this be a good idea? Can one operation affect the other, since both use the same exe?

+4
source share
2 answers

: ? , exe?

, Console exe . exe .

, ; . ,

You could simple test this by manually running two instances of your console application(by hard coding RunDailyTask and RunEvery15MinutesTask in each exe)

, , (1,2) , .

enum OperationType
{
  RunDailyTask = 1,
  RunEvery15MinutesTask = 2
}
+2

. . . , exe?

(). , , RunEvery15MinutesTask RunDailyTask.

+1

All Articles