Here is my situation:
I have a VBScript that, among many other things, is creating a batch file that contains an execution of gtar to uncompress a tar file.
This VBScript is executed when a certain file is present in a directory. Execution is not the problem unless this script is kicked off simultaneously at the same time by two different automating tasks.
The automating task is looking for a specific file respective to a client in their directory. There are approximately 100 tasks that look for files in their respective client's directories that execute at random times throughout every day.
Once in a great blue moon, 2 tasks will kick off at the exact same time, which they will then both go through their script and will try to use gtar at the same time to uncompress their respective files.
Gtar does not agree with simultaneous execution and therefore procedes to uncompress only one of the files, or possibly both at the same time, and in doing so, "mish-moshes" the uncompressed files in one or both of the client's directories, thus causing a mess for me to clean up.
I have tried to implement a randomizing equation(s) to give me a value to use for a sleep command to offset the execution of gtar but there is still a remote chance that they will still execute the script at the same time, giving the same random number and still executing gtar at the same time.
I have tried Winzip's command line interface but it does not support uncompressing .tgz files.
The version of gtar I am utilizing is 1.12. I looked for a windows exe of 1.14, but was unable to find it.
The machine is a Dual P4 Xeon 3.06, 4 GB Ram, plenty o' hard drive space and running on Win 2k3 that is up to date.
Question:
Is there another way to:
- Uncompress each of the files automatically using third party software other than gtar?
- another course of action I should be looking at?
Any help is greatly appreciated.
I have a VBScript that, among many other things, is creating a batch file that contains an execution of gtar to uncompress a tar file.
This VBScript is executed when a certain file is present in a directory. Execution is not the problem unless this script is kicked off simultaneously at the same time by two different automating tasks.
The automating task is looking for a specific file respective to a client in their directory. There are approximately 100 tasks that look for files in their respective client's directories that execute at random times throughout every day.
Once in a great blue moon, 2 tasks will kick off at the exact same time, which they will then both go through their script and will try to use gtar at the same time to uncompress their respective files.
Gtar does not agree with simultaneous execution and therefore procedes to uncompress only one of the files, or possibly both at the same time, and in doing so, "mish-moshes" the uncompressed files in one or both of the client's directories, thus causing a mess for me to clean up.
I have tried to implement a randomizing equation(s) to give me a value to use for a sleep command to offset the execution of gtar but there is still a remote chance that they will still execute the script at the same time, giving the same random number and still executing gtar at the same time.
I have tried Winzip's command line interface but it does not support uncompressing .tgz files.
The version of gtar I am utilizing is 1.12. I looked for a windows exe of 1.14, but was unable to find it.
The machine is a Dual P4 Xeon 3.06, 4 GB Ram, plenty o' hard drive space and running on Win 2k3 that is up to date.
Question:
Is there another way to:
- Uncompress each of the files automatically using third party software other than gtar?
- another course of action I should be looking at?
Any help is greatly appreciated.