Jump to content

Stopping a script if 2nd user is running a script


This topic is 7384 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a file with about 40,000 records. Several times a day a script is run by a user that goes thru every record and updates each record (don't ask why, but it has to right now). This script takes about 6 minutes to run.

Other users runs scripts that find sets of these records. If the previously mentioned script that is updating the records is currently running, other users that run the find scripts get incorrect results and they take 10x longer to run.

Can I add to the find scripts, steps that will return a message (and halt the find script) if the updating script is being run? The updating script is always run by a different user, obviously. Thansk in advance for any help.

Link to comment
Share on other sites

Hi vanderark,

You could have an extra database with one record and one field that flags if the script is running,

The find scripts would have to check this flag before executing their actual find steps.

Regards,

Ernst.

Link to comment
Share on other sites

I also set the new DB up to have several fields, each for a different DB/Script.

This way, I can have the single new DB and have all other DB's refer to it and to a specific field in it, before running resource-heavy scripts.

Great idea!

Link to comment
Share on other sites

This topic is 7384 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.