Hi,
I would like to be able to make Squeak save the image from a Windows .bat script. Is it possible to control the VM and the image once launched?
Thank you
fork a process that sleeps maybe 10 seconds and on wake up, checks for a file named, for example, SHUTDOWN.txt in a given folder. If found then snapshot the image and quit.
Then in the script create and remove the folder on demand.
Miguel Cobá
On Tue, Jun 9, 2009 at 12:40 PM, Damien Cassoudamien.cassou@gmail.com wrote:
Hi,
I would like to be able to make Squeak save the image from a Windows .bat script. Is it possible to control the VM and the image once launched?
Thank you
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
Something like this:
[ [ [ 60 seconds asDelay wait. (FileDirectory default fileOrDirectoryExists: '/var/squeak/save.squeak') ifTrue: [ SmalltalkImage current snapshot: true andQuit: false ] ] on: Error do: [ :error | error asDebugEmail ] ] repeat ] forkAt: Processor systemBackgroundPriority. Project uiProcess suspend.
Based on a script from Ramon Leon.
Miguel Cobá
On Tue, Jun 9, 2009 at 12:56 PM, Miguel Cobámiguel.coba@gmail.com wrote:
fork a process that sleeps maybe 10 seconds and on wake up, checks for a file named, for example, SHUTDOWN.txt in a given folder. If found then snapshot the image and quit.
Then in the script create and remove the folder on demand.
Miguel Cobá
On Tue, Jun 9, 2009 at 12:40 PM, Damien Cassoudamien.cassou@gmail.com wrote:
Hi,
I would like to be able to make Squeak save the image from a Windows .bat script. Is it possible to control the VM and the image once launched?
Thank you
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
Thank you very much
On Tue, Jun 9, 2009 at 8:01 PM, Miguel Cobámiguel.coba@gmail.com wrote:
Something like this:
[ [ [ 60 seconds asDelay wait. (FileDirectory default fileOrDirectoryExists: '/var/squeak/save.squeak') ifTrue: [ SmalltalkImage current snapshot: true andQuit: false ] ] on: Error do: [ :error | error asDebugEmail ] ] repeat ] forkAt: Processor systemBackgroundPriority. Project uiProcess suspend.
Based on a script from Ramon Leon.
Miguel Cobá
On Tue, Jun 9, 2009 at 12:56 PM, Miguel Cobámiguel.coba@gmail.com wrote:
fork a process that sleeps maybe 10 seconds and on wake up, checks for a file named, for example, SHUTDOWN.txt in a given folder. If found then snapshot the image and quit.
Then in the script create and remove the folder on demand.
Miguel Cobá
On Tue, Jun 9, 2009 at 12:40 PM, Damien Cassoudamien.cassou@gmail.com wrote:
Hi,
I would like to be able to make Squeak save the image from a Windows .bat script. Is it possible to control the VM and the image once launched?
Thank you
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
Does that image have Seaside? If so, you can have a particular URL does that the save. So, then, from .bat you can do something like wget to that URL
cheers,
mariano
On Wed, Jun 10, 2009 at 6:37 AM, Damien Cassou damien.cassou@gmail.comwrote:
Thank you very much
On Tue, Jun 9, 2009 at 8:01 PM, Miguel Cobámiguel.coba@gmail.com wrote:
Something like this:
[ [ [ 60 seconds asDelay wait. (FileDirectory default fileOrDirectoryExists:
'/var/squeak/save.squeak')
ifTrue: [ SmalltalkImage current snapshot: true andQuit: false ]
] on: Error do: [ :error | error asDebugEmail ] ] repeat ] forkAt: Processor systemBackgroundPriority. Project uiProcess suspend.
Based on a script from Ramon Leon.
Miguel Cobá
On Tue, Jun 9, 2009 at 12:56 PM, Miguel Cobámiguel.coba@gmail.com
wrote:
fork a process that sleeps maybe 10 seconds and on wake up, checks for a file named, for example, SHUTDOWN.txt in a given folder. If found then snapshot the image and
quit.
Then in the script create and remove the folder on demand.
Miguel Cobá
On Tue, Jun 9, 2009 at 12:40 PM, Damien Cassoudamien.cassou@gmail.com
wrote:
Hi,
I would like to be able to make Squeak save the image from a Windows .bat script. Is it possible to control the VM and the image once launched?
Thank you
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
On Wed, Jun 10, 2009 at 2:49 PM, Mariano Martinez Peckmarianopeck@gmail.com wrote:
Does that image have Seaside? If so, you can have a particular URL does that the save. So, then, from .bat you can do something like wget to that URL
Excellent and very simple idea. Thank you
Or use one of the many networking services Squeak supports and establish a client/server connection, for example with http.
Regards, Has.
On Tue, Jun 9, 2009 at 7:40 PM, Damien Cassoudamien.cassou@gmail.com wrote:
Hi,
I would like to be able to make Squeak save the image from a Windows .bat script. Is it possible to control the VM and the image once launched?
Thank you
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
squeak-dev@lists.squeakfoundation.org