Don't schedule it to run more than once and then secure your system so that
no unauthorised users can start jobs (that they do not own).
You could add additional logic within you process or as another job step to
perform various checks.
You could query the sysjobhistory table to check when a job last ran for
example and if within a specified time period, raise an error halting the
job. A better method would be to design your processing such that it can
cope with multiple runs, or failing that checks for invalid data or other
such validations as can be determined by your business logic, and raiser
errors appropriately.
--
Darren Green
http://www.sqldts.com
"hngo01" <hngo01 (AT) hotmail (DOT) com> wrote
Quote:
Hi all, How do we prevent a job not to run more than once?
I have a job that only need to run one time a day. If I
accidentally run again then I have an issue. Duplicate
data. Thanks All |