Scheduling a daily task

classic Classic list List threaded Threaded
5 messages Options
Bernat Romagosa Bernat Romagosa
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Scheduling a daily task

Hi list,

I'd like my app to take a snapshot of the DB once a day, is there some standard way to do so?

Thanks!

--
Bernat Romagosa.
Bernat Romagosa Bernat Romagosa
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Scheduling a daily task

I've finally used a regular Smalltalk process, it seems to work okay :)

2011/7/13 Bernat Romagosa <[hidden email]>
Hi list,

I'd like my app to take a snapshot of the DB once a day, is there some standard way to do so?

Thanks!

--
Bernat Romagosa.



--
Bernat Romagosa.
fstephany fstephany
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Scheduling a daily task

Hi Bernat,

If you're using Squeak/Pharo, the Scheduler package is maybe what you're
looking for:

http://www.squeaksource.com/Scheduler.html

On 14/07/11 16:01, Bernat Romagosa wrote:

> I've finally used a regular Smalltalk process, it seems to work okay :)
>
> 2011/7/13 Bernat Romagosa <[hidden email]
> <mailto:[hidden email]>>
>
>     Hi list,
>
>     I'd like my app to take a snapshot of the DB once a day, is there
>     some standard way to do so?
>
>     Thanks!
>
>     --
>     Bernat Romagosa.
>
>
>
>
> --
> Bernat Romagosa.
Janko Mivšek Janko Mivšek
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Scheduling a daily task

In reply to this post by Bernat Romagosa
Hi Bernat,

There are WebScheduler (and WebSchedulerEvent) classes in Aida and they
are quite independent, they can be used in Iliad too. Also there you can
see how a hourly snapshot is done, see AIDASite  #initHourlySnapshot,
class #imageSnapshot.

Best regards
Janko


S, Bernat Romagosa piše:

> I've finally used a regular Smalltalk process, it seems to work okay :)
>
> 2011/7/13 Bernat Romagosa <[hidden email]
> <mailto:[hidden email]>>
>
>     Hi list,
>
>     I'd like my app to take a snapshot of the DB once a day, is there
>     some standard way to do so?
>
>     Thanks!
>
>     --
>     Bernat Romagosa.
>
>
>
>
> --
> Bernat Romagosa.

--
Janko Mivšek
Aida/Web
Smalltalk Web Application Server
http://www.aidaweb.si
Bernat Romagosa Bernat Romagosa
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Scheduling a daily task

Cool, I'll take a look at both options.

Right now I'm doing:

self isSchedulerOn
ifFalse: [ 
Scheduler := [ 
(Delay forDuration: 1 day) wait.
self takeSnapshotTriggeredBy: #dailySnapshot ] repeat ] forkAt: Processor lowIOPriority ]

Which seems to work pretty well, and for stopping it:

self isSchedulerOn
ifTrue: [ 
[ Scheduler isTerminated ] whileFalse: [ Scheduler terminate ].
Scheduler := nil ]

I'll still look at both other options, though. They seem more professional than my clutch ;)

Thanks!

2011/7/14 Janko Mivšek <[hidden email]>
Hi Bernat,

There are WebScheduler (and WebSchedulerEvent) classes in Aida and they
are quite independent, they can be used in Iliad too. Also there you can
see how a hourly snapshot is done, see AIDASite  #initHourlySnapshot,
class #imageSnapshot.

Best regards
Janko


S, Bernat Romagosa piše:
> I've finally used a regular Smalltalk process, it seems to work okay :)
>
> 2011/7/13 Bernat Romagosa <[hidden email]
> <mailto:[hidden email]>>
>
>     Hi list,
>
>     I'd like my app to take a snapshot of the DB once a day, is there
>     some standard way to do so?
>
>     Thanks!
>
>     --
>     Bernat Romagosa.
>
>
>
>
> --
> Bernat Romagosa.

--
Janko Mivšek
Aida/Web
Smalltalk Web Application Server
http://www.aidaweb.si



--
Bernat Romagosa.
Loading...