[Closed] sleep, post-render sript
Hi everyone,
I’m a newbie in Maxscript trying the following:
After my renderjob (ca. 5 hours) i would like to start a Syncback (Backup-Software) profile. That’s the reason why i wrote a script (*.ms) which is activated in max under “Enable post-Render Script”. What happened is that max “thinks” the renderjob is done when my renderplugin (Maxwell) is started. Therefore i tried the “sleep” command to start the *.ms
Here is the code
sleep 18000
max file save
doscommand “C:\Windows\System32\schtasks.exe /RUN /TN Syncback_ich_geh_jez_heim”
What is wrong, any idea?
thank you very much for any help!
Brucebra
windows 7 prof. 64bit
3DMax 2010 64bit
Maxwell Renderplugin 2.0.3
there is nothing wrong in your script… but to sleep 5 hours is too long
do you really need 5 hours delay after render ends?
what do you mean by “to long”? Is there a maximum of time to be paused? Why?
The thing is i want max to wait till the rendering job is finished. I would -of course- like nothing better than to get a process information from Maxwell that the job is done, but i’m simply too unexpierienced to manage it,or it’s not possible.
As I know there is no limit for sleep (maybe it’s max integer 2147483647).
I want to say that when MAX sleeps it doesn’t do anything. It’s completely frozen. When Maxwell does do something it has to save the result. So you have to know result (end) file/s.
Just check the fact that the last Maxwell file was saved on the disk and run the script.
Also I don’t understand why the max file has to be saved after Maxwell did its job.
Max was not frozen, it has got the signal that the render-job is done, because somehow it started the “post-render”-Script too early! Therefore i thougt something could be wrong with the sleep statement or argument.
How should i know what’s the last file, maxwell saves every so-called Sampling Level…
You’re right, no reason for saving…
Never used Maxwell myself but as i remember you can set how much time to render to enjoy batch mode, and in this case the render-time is known.
Yes, the render time is known. Therefore I tried to wait for that period of time using the the “sleep-function”. My Problem is : Max starts the command too early…
strange, sleep() never fail for me.
you can test it accuracy if you like
(
st = timeStamp()
sleep 30
et = (timeStamp() - st) / 1000
format "Max waiting for %sec.
" et
)
and if by some reason sleep() not works as it s’d, then use timeStamp() to made custom “sleep”