[Seaside] Running a method periodically on a Seaside site

Sven Van Caekenberghe sven at stfx.eu
Mon Mar 18 16:11:34 UTC 2019


Just use a process like this (in your run.st file):

[ [
    1 minute wait.
    Bla sendOlderOutstanding.
] repeat ]
    forkAt: Processor lowIOPriority
    named: 'Periodic Sigfox sendOlderOutstanding'.

[ [
    5 minutes wait.
    Bla transferT3SigfoxDownlinks.
] repeat ]
    forkAt: Processor lowIOPriority
    named: 'Periodic Sigfox transferT3SigfoxDownlinks'.

You could also add an error handler to protect your process from dying when an error occurs in one iteration.

> On 18 Mar 2019, at 16:28, sergio ruiz <sergio.rrd at gmail.com> wrote:
> 
> I would like to run an “update all data” type method that grabs data from a few services, crunches it, and spits data to another service. I would like to run this twice a day.
> 
> What is the most Smalltalk/Pharo/Seaside approach to such a thing?
> 
> I thought about running it from the command line using a cron job, which I would totally like, but the job dies because it tries to run another copy of the same image with Seaside already running.
> 
> I thought about creating a REST endpoint, and calling it via wget using cron, but I got too bogged down in installing the Seaside REST packages, and running into errors everywhere.
> 
> Any suggestions?
> 
> Thanks!
> 
> ----
> peace,
> sergio
> photographer, journalist, visionary
> 
> Public Key: http://bit.ly/29z9fG0
> #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
> http://www.codeandmusic.com
> http://www.twitter.com/sergio_101
> http://www.facebook.com/sergio101
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the seaside mailing list