Define a generic class that can perform the function you desire, say in your
lib directory. In your task you can use that class to perform the functions
on cron by instantiating an object of that class and passing the required
parameters (through the constructor or with setters) and because it is an
abstracted class you can also instantiate an object of that class to perform
the same functions in other locations.

On Tue, Oct 19, 2010 at 1:50 AM, Joshua <houseaddi...@gmail.com> wrote:

> I'm using Symfony's Tasks to run cronjobs at periodic times. There is
> a need to perform the same functions manually in the admin
> application. Looking for suggestions how to do this properly.
> Obviously, I would prefer not to have duplicate code, one in the Task
> class and one in the Action class. Please and thank you.
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to