In scientific workflow systems, temporal consistency is critical to ensure the timely completion of workflow instances. To monitor and guarantee the correctness of temporal consistency, temporal constraints are often set and then verified. However, most current work adopts user specified temporal constraints without considering system performance, and hence may result in frequent temporal violations that deteriorate the overall workflow execution effectiveness. In this paper, with a systematic analysis of such problem, we propose a probabilistic strategy which is capable of setting coarse-grained and fine-grained temporal constraints based on the weighted joint distribution of activity durations. The strategy aims to effectively assign a set of temporal constraints which are well balanced between user requirements and system performance. The effectiveness of our work is demonstrated by an example scientific workflow in our scientific workflow system.