Same Django cronjob with different parameter
up vote
0
down vote
favorite
I have a base Django
cron class which do a work periodically. Same work is done for three different parameters as follows :
class FooCronJob(CronJobBase):
def do(self):
for par in ['par1', 'par2', 'par3']:
# Do same thing for each parameter
I want to parallelize cronjob for these three parameters, meaning that I want to have 3 cronjobs which do the base cronjob for each parameter.
What is the best way to do this without replicating code? I'm using django-cron
package with python3.
python django cron django-cron
add a comment |
up vote
0
down vote
favorite
I have a base Django
cron class which do a work periodically. Same work is done for three different parameters as follows :
class FooCronJob(CronJobBase):
def do(self):
for par in ['par1', 'par2', 'par3']:
# Do same thing for each parameter
I want to parallelize cronjob for these three parameters, meaning that I want to have 3 cronjobs which do the base cronjob for each parameter.
What is the best way to do this without replicating code? I'm using django-cron
package with python3.
python django cron django-cron
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a base Django
cron class which do a work periodically. Same work is done for three different parameters as follows :
class FooCronJob(CronJobBase):
def do(self):
for par in ['par1', 'par2', 'par3']:
# Do same thing for each parameter
I want to parallelize cronjob for these three parameters, meaning that I want to have 3 cronjobs which do the base cronjob for each parameter.
What is the best way to do this without replicating code? I'm using django-cron
package with python3.
python django cron django-cron
I have a base Django
cron class which do a work periodically. Same work is done for three different parameters as follows :
class FooCronJob(CronJobBase):
def do(self):
for par in ['par1', 'par2', 'par3']:
# Do same thing for each parameter
I want to parallelize cronjob for these three parameters, meaning that I want to have 3 cronjobs which do the base cronjob for each parameter.
What is the best way to do this without replicating code? I'm using django-cron
package with python3.
python django cron django-cron
python django cron django-cron
asked Nov 10 at 11:09
mohammad
7361624
7361624
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53238348%2fsame-django-cronjob-with-different-parameter%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password