Is it possible to disable a task using expression evaluation?

I have an SSIS package that is scheduled to export data daily. I have several Tasks that I would like to perform only on the first day of the month. It is important that these tasks are skipped and the package continues to run if it is not the first month.

After a short search, I found many links to solve this problem using the method posted in the following blog post: http://bi-polar23.blogspot.com/2007/05/conditional-task-execution.html

I think, however, there is a simpler solution. Why can't I just add an expression for each of my tasks on the 1st day of the month, which checks the day of the month and sets the "Disabled" property in the task accordingly?

Using expressions and disabling a task seems a lot easier than adding a dummy script before each task. Does anyone else see or know a problem with my method to solve this problem? Preliminary tests seem to work, however I found that SSIS is sophisticated. I would prefer not to do something “unconventional” if this could cause problems in the future.

Thanks for any thoughts.

+3
source share
1 answer

, - unconventional . , . Disable Expressions Script Task. . # 1. , .

, , , , , ( ). , Annotation, , Disable Expression .

, , - , EvaluateAsExpression true, \enable. . # 1 , Disable , IsFirstDayOfMonth. .

, .

№1:

1

+7

All Articles