Re: django cron Job Functionality

2021-06-12 Thread Ayser shuhaib
, 12 Jun 2021 at 06:36, Nikeet NA >>>>> wrote: >>>>> >>>>>> You should use celery for running cron jobs. >>>>>> >>>>>> On Friday, 11 June 2021 at 19:49:41 UTC+5:30 kells...@gmail.com >>>>>> wrote:

Re: django cron Job Functionality

2021-06-12 Thread Eugene TUYIZERE
>>>> wrote: >>>> >>>>> You should use celery for running cron jobs. >>>>> >>>>> On Friday, 11 June 2021 at 19:49:41 UTC+5:30 kells...@gmail.com wrote: >>>>> >>>>>> >>>>>> What

Re: django cron Job Functionality

2021-06-12 Thread Lalit Suthar
>>>>> On Friday, 11 June 2021 at 19:49:41 UTC+5:30 kells...@gmail.com wrote: >>>>> >>>>>> >>>>>> What I would do in such case, is to write a function somewhere that >>>>>> checks if a user applied for a lea

Re: django cron Job Functionality

2021-06-11 Thread Ayser shuhaib
NA wrote: >>> >>>> You should use celery for running cron jobs. >>>> >>>> On Friday, 11 June 2021 at 19:49:41 UTC+5:30 kells...@gmail.com wrote: >>>> >>>>> >>>>> What I would do in such case, is to write a function somew

Re: django cron Job Functionality

2021-06-11 Thread Ayser shuhaib
ser applied for a leave, then check if the leave time is >>>> within a day, then do whatever you want, like setting is_active to False. >>>> Then set the cron job to run this function every day, every hour, or >>>> however you'd like. >>>

Re: django cron Job Functionality

2021-06-11 Thread Ayser shuhaib
>>> >>> What I would do in such case, is to write a function somewhere that >>> checks if a user applied for a leave, then check if the leave time is >>> within a day, then do whatever you want, like setting is_active to False. >>> Then set the cron job to run t

Re: django cron Job Functionality

2021-06-11 Thread Eugene TUYIZERE
49:41 UTC+5:30 kells...@gmail.com wrote: > >> >> What I would do in such case, is to write a function somewhere that >> checks if a user applied for a leave, then check if the leave time is >> within a day, then do whatever you want, like setting is_active to False.

Re: django cron Job Functionality

2021-06-11 Thread Nikeet NA
do whatever you want, like setting is_active to False. Then set > the cron job to run this function every day, every hour, or however you'd > like. > On Fri, Jun 11, 2021 at 15:10 Chetan Ganji wrote: > >> This will help you >> >> https://pypi.org/project/django-c

Re: django cron Job Functionality

2021-06-11 Thread Kelvin Sajere
What I would do in such case, is to write a function somewhere that checks if a user applied for a leave, then check if the leave time is within a day, then do whatever you want, like setting is_active to False. Then set the cron job to run this function every day, every hour, or however you&#

Re: django cron Job Functionality

2021-06-11 Thread Chetan Ganji
> the start leave date. At the same time the system disables the user in the > system. Here I have a field *is_active *and I want the system to set it > to False from the leave date to the end date. And also to set Ongoing > status on the leave plan user list. I heard somewhere that

django cron Job Functionality

2021-06-11 Thread Eugene TUYIZERE
set it to False from the leave date to the end date. And also to set Ongoing status on the leave plan user list. I heard somewhere that Django Cron Job can do this but I never use it and I do not know how to use it in the application. If someone has used it for some time please I need help. Thank

Re: Cron Job

2015-10-14 Thread 'Chris Norman' via Django users
Hi, Thanks for the advice. I actually found that just after writing my post. Now the cron job works perfectly. Thanks, On 10/14/2015 3:26 PM, Vijay Khemlani wrote: The easiest way would be using a custom management command https://docs.djangoproject.com/en/1.8/howto/custom-management

Re: Cron Job

2015-10-14 Thread Vijay Khemlani
The easiest way would be using a custom management command https://docs.djangoproject.com/en/1.8/howto/custom-management-commands/ On Wed, Oct 14, 2015 at 10:53 AM, 'Chris Norman' via Django users < django-users@googlegroups.com> wrote: > Hi again, > I would like to set

Cron Job

2015-10-14 Thread 'Chris Norman' via Django users
Hi again, I would like to set up a cron job to email the day's journeys to a pre-defined set of email addresses, using the model I described in the previous example. I have it so I can type: python manage.py shell import journey_sender This does everything. Thing is, I would like t

Re: django cron job - stops after reading some portion of huge file - why is this?

2013-10-15 Thread Bill Freeman
n(s) >> print n >> print 'done' >> >> That should work. If not, does your O/S not correctly handle files that >> big? >> >> Bill >> >> >> On Tue, Oct 15, 2013 at 6:55 AM, doniyor wrote: >> >>> I am read

Re: django cron job - stops after reading some portion of huge file - why is this?

2013-10-15 Thread doniyor
E.g.: >>> >>> f = open('your/file/path/here') >>> n = 0 >>> s = True >>> while s: >>> s = f.read(1024*1024) >>> n += len(s) >>> print n >>> print 'done&#x

Re: django cron job - stops after reading some portion of huge file - why is this?

2013-10-15 Thread doniyor
n += len(s) > print n > print 'done' > > That should work. If not, does your O/S not correctly handle files that > big? > > Bill > > > On Tue, Oct 15, 2013 at 6:55 AM, doniyor > > wrote: > >> I am reading file from url and par

Re: django cron job - stops after reading some portion of huge file - why is this?

2013-10-15 Thread Bill Freeman
mation out > of this file into db - using cron job. > > i am testing now in my local dev. > > the problem is: job is reading file and saving into db without any problem > but after some time, since file is very huge approx. >8GB, job doesnot do > anything and freezes, without gi

django cron job - stops after reading some portion of huge file - why is this?

2013-10-15 Thread doniyor
I am reading file from url and parsing it and saving some information out of this file into db - using cron job. i am testing now in my local dev. the problem is: job is reading file and saving into db without any problem but after some time, since file is very huge approx. >8GB, job does

Re: django-newsletter, cron job not working

2013-04-18 Thread Shawn Milochik
Here's an example of something taken straight from my crontab from a WebFaction account: 44 * * * * cd ~/webapps/awstats_milocast;./update_awstats.sh This runs on minute 44 of every hour. There are five "time" parameters. The first one is "minute." If you set a number there, it'll run on that min

Re: django-newsletter, cron job not working

2013-04-18 Thread Tom Evans
On Wed, Apr 17, 2013 at 7:38 PM, frocco wrote: > Hello, > > Can someone give me an example of running a cronjob hourly? > I am on webfaction and cannot get this working. > > I tried > > @hourly /usr/local/bin/python2.7 ~/webapps/ntw/myproject/manage.py runjob > submit > > I get no email > > If I S

Re: django-newsletter, cron job not working

2013-04-17 Thread frocco
o read what the message is. > > your_command &> /tmp/broken_cron.log > > Then rig your cron job to run ASAP and read the log. > > > On Wed, Apr 17, 2013 at 2:38 PM, frocco >wrote: > >> Hello, >> >> Can someone give me an example of running a cronj

Re: django-newsletter, cron job not working

2013-04-17 Thread Sam Walters
command so that it puts all standard output and standard > error to a file to read what the message is. > > your_command &> /tmp/broken_cron.log > > Then rig your cron job to run ASAP and read the log. > > > On Wed, Apr 17, 2013 at 2:38 PM, frocco wrote: > >> Hel

Re: django-newsletter, cron job not working

2013-04-17 Thread Shawn Milochik
It's almost certainly an environment issue, such as an issue with your PATH or PYTHONPATH. Just add to the command so that it puts all standard output and standard error to a file to read what the message is. your_command &> /tmp/broken_cron.log Then rig your cron job to run ASAP

django-newsletter, cron job not working

2013-04-17 Thread frocco
Hello, Can someone give me an example of running a cronjob hourly? I am on webfaction and cannot get this working. I tried @hourly /usr/local/bin/python2.7 ~/webapps/ntw/myproject/manage.py runjob submit I get no email If I SSH in and sunit manually, it works fine -- You received this messa

Cron job with external smtp mailer instead of local postfix

2010-02-12 Thread GoSantoni
Hi group, On my ubuntu server I'm using pinax 0.71 and for deployment I used this tutorial http://pinaxproject.com/docs/dev/deployment.html#sending-mail-and-notices The emailsettings are: EMAIL_HOST = 'smtp.gmail.com' EMAIL_HOST_USER = $$ EMAIL_HOST_PASSWORD = $$ EMAIL_PORT = 587 EMAIL_USE_TLS

Re: permalinks from cron job

2010-01-18 Thread eric.frederich
I do not understand how this would work. The only place where /apps/ is mentioned is apache's config file. WSGIScriptAlias /apps /export/home/web/docs/django/my_site/apache/ django.wsgi There is nothing in my Django settings about /apps/. Is there a setting that I can put in my Django settings?

Re: permalinks from cron job

2010-01-18 Thread Andy McKay
You can set a prefix here: http://code.djangoproject.com/browser/django/trunk/django/core/urlresolvers.py#L364 -- Andy McKay, @clearwind http://clearwind.ca/djangoski -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

Re: permalinks from cron job

2010-01-17 Thread Ted Nyman
More generally, in a crontab, you'll need to set both the PYTHONPATH and give the location of the relevant Django settings. -Ted On Jan 17, 2010, at 8:22 PM, "eric.frederich" wrote: Is there some setting somewhere to set the prefix? Can it be set via an environment variable? How to I ge

Re: permalinks from cron job

2010-01-17 Thread eric.frederich
gt; prefix '/apps'. > > So, my question is how do I get the /apps prefix into my urls when > running outside of the web (i.e. via a cron job). > > Is there some setting somewhere to set the prefix? > Can it be set via an environment variable? > How to I get the re

permalinks from cron job

2010-01-14 Thread eric.frederich
https://mydomain.com/apps/some_app/ I looked dug around django's code and saw that the magic was happening between urlresolvers.py and the wsgi handler setting the appropriate prefix '/apps'. So, my question is how do I get the /apps prefix into my urls when running outside of the web

Re: Cron Job Question

2009-01-29 Thread Malcolm Tredinnick
On Thu, 2009-01-29 at 11:34 -0800, Chris wrote: > I have a python / django script that I have written which will be > used as a cron. Basically this script goes out to my database and gets > rows from a given table and performs a specific task then deletes the > row once finished. What I would li

Re: Cron Job Question

2009-01-29 Thread Jeff Anderson
conds and checks again. This works very well in production. Most of the time only one or two jobs will be inserted at a time, but occasionally several hundreds or thousands of jobs will be inserted. One instance of the worker script handles this very well. We moved away from the cron job, and implem

Cron Job Question

2009-01-29 Thread Chris
I have a python / django script that I have written which will be used as a cron. Basically this script goes out to my database and gets rows from a given table and performs a specific task then deletes the row once finished. What I would like to do is have multiple instances of this script runni

Re: setting language in a cron job

2008-12-12 Thread pihentagy
Thanks, it works!!! Well, again a low-level function %-/, but I hope I won't use too much of these magic low-level hacks. On Dec 12, 4:07 pm, Rajesh Dhawan wrote: > On Dec 12, 8:33 am, pihentagy wrote: > > Hi all! > > > I started to write a cron job, which sends remi

Re: setting language in a cron job

2008-12-12 Thread Rajesh Dhawan
On Dec 12, 8:33 am, pihentagy wrote: > Hi all! > > I started to write a cron job, which sends reminders to users, but run > into the following: > > I do not know how to set the current language in this situation. > Setting settings.LANGUAGE_CODE has no effect. > > N

setting language in a cron job

2008-12-12 Thread pihentagy
Hi all! I started to write a cron job, which sends reminders to users, but run into the following: I do not know how to set the current language in this situation. Setting settings.LANGUAGE_CODE has no effect. Note, that not only the text in the mail should be different, but it contains model

Re: Cron job help..

2008-11-14 Thread m h
Try telling crontab to execute your script with python ;) Or put #!/usr/bin/env python on the first line and chmod appropriately -cheers matt On Sat, Nov 15, 2008 at 12:41 AM, laspal <[EMAIL PROTECTED]> wrote: > > Ok I got the point but I run into some other problem. > > when I run python /home/

Re: Cron job help..

2008-11-14 Thread laspal
Ok I got the point but I run into some other problem. when I run python /home/laspal/test/test.py It run without giving any error. but when I do crontab -e and add the file -> */5 * * * * /home/laspal/work/ibms/triget_mail.py > /tmp/foo.log 2>&1 and go to /tmp/foo.log I am getting error /home

Re: Cron job help..

2008-11-14 Thread Malcolm Tredinnick
On Fri, 2008-11-14 at 02:52 -0800, laspal wrote: > Hi, > I am trying to write cron job for trigger mail whenever task is > overdue. [... snip ...] > So my problem is how do I run it.I mean how can I connect to my djanog > project?? > here is my project path -> /home/work/t

Cron job help..

2008-11-14 Thread laspal
Hi, I am trying to write cron job for trigger mail whenever task is overdue. Here is the code for simple sending mail. import sys import os def setup_environment(): pathname = os.path.dirname(sys.argv[0]) sys.path.append(os.path.abspath(pathname)) sys.path.append(os.path.normpath

Re: faking a cron job

2008-09-28 Thread Julian
okay guys, you've convinced me - it'll do a cronjob! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this gr

Re: faking a cron job

2008-09-28 Thread Jeff Anderson
Julian wrote: > hi there, > > i have written a middleware-class wich is doing what a cronjob should > do. it is doing some backup-stuff, and repeats that every 12 hours. it > is a thread and is placed in the list of middleware-classes, but not > processing any request or overwriting any typical met

Re: faking a cron job

2008-09-28 Thread Tom Badran
The obvious solution seems to be use a cron job, instead of trying to strongarm django/apache into doing something that they aren't for. There is no reason your cron job couldnt be a python script that uses django classes/your model etc. if you want. Tom On Sun, Sep 28, 2008 at 8:11 PM, J

faking a cron job

2008-09-28 Thread Julian
hi there, i have written a middleware-class wich is doing what a cronjob should do. it is doing some backup-stuff, and repeats that every 12 hours. it is a thread and is placed in the list of middleware-classes, but not processing any request or overwriting any typical method for a middleware cla

Re: Using Django in a Cron Job

2006-08-09 Thread JHeasly
endmail > > function. Can someone help me understand what imports/path setup I > > have to do to get this working? (Note: I will not be setting up the > > Cron job, nor do I know now. I will simply be giving a python script > > to our IT staff for them to set up). Also, if y

Re: Using Django in a Cron Job

2006-08-09 Thread Jeremy Dunck
I would have to do on the Cron job. DJANGO_SETTINGS_MODULE=python.module.path.to.project.settings.file python yourjob.py --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gr

Re: Using Django in a Cron Job

2006-08-09 Thread Steven Armstrong
e understand what imports/path setup I > have to do to get this working? (Note: I will not be setting up the > Cron job, nor do I know now. I will simply be giving a python script > to our IT staff for them to set up). > > Thanks for the help, > > Joe > %<

Re: Using Django in a Cron Job

2006-08-09 Thread Tyson Tate
Can someone help me understand what imports/path setup I > have to do to get this working? (Note: I will not be setting up the > Cron job, nor do I know now. I will simply be giving a python script > to our IT staff for them to set up). Here's what I use: -- import sys, os sys.path.appe

Re: Using Django in a Cron Job

2006-08-09 Thread Waylan Limberg
ption. I would like to access a Django model that > has the user's email addresses, as well as use the Django sendmail > function. Can someone help me understand what imports/path setup I > have to do to get this working? (Note: I will not be setting up the > Cron job, nor do I

Re: Using Django in a Cron Job

2006-08-09 Thread Joe
Thanks a bunch! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED

Re: Using Django in a Cron Job

2006-08-09 Thread Joe
Thanks for the tip! However, when I use the shell in Django, I use the command : python manage.py shell. I was just wondering if there was some behind the scenes setup (in the path, for instance) that was being done that I would have to do on the Cron job

Using Django in a Cron Job

2006-08-09 Thread Joe
this working? (Note: I will not be setting up the Cron job, nor do I know now. I will simply be giving a python script to our IT staff for them to set up). Thanks for the help, Joe --~--~-~--~~~---~--~~ You received this message because you are subscribed t