If I create a dummy job and put in SLEEP 30 into the job control it works like it should and pauses for 30 seconds before continuing.
I have now created a job with more complex processing in the job control, it is actually used to start n-parallel runs of several hundred jobs (meaning you specify how many concurrent processes to run and when one finishes the job starts the next one). This job works as it should but I am having trouble slowing it down.
When I run this job it does not SLEEP; the two DSLogInfo() timestamps are in the same second! I have changed this line to SLEEP 30 (using a constant) and NAP 30000 to no avail.
Does anyone have an idea of what could be happening?
Even stranger. I wrote a test function which displays an informational message and executes a SLEEP and added that function call to my job. The informational message is being displayed, but no SLEEP is taking place. Somehow the sleep call is being suborned/skipped/ignored. Very odd..
I ended up calling EXECUTE "SLEEP 30" and that didn't work either; so I finally did a EXECUTE 'SH -C "sleep 30"' and let UNIX take care of the pause. I did a bit of checking and put a SLEEP 30 at the beginning of the program and that did pause, but somewhere in the execution it stopped. The only external calls I am doing are to the normal DSAttach()(),DSPrepareJob(),DSRunJob() and DSGetJobStatus(). I will look into this more when I have a chance.
Ray - I tried different times (60,10 etc.). I'll have to look at the docs again, I didn't know you could specify a time to wait until in that call. Plus, remember that the NAP command had the same problem. Quite odd.