Sat, 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:
et 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
>>>>> 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
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
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'd like.
>>>>
;
>>>
>>> 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
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 Fa
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-celery
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'd
> 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
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 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
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
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 up a cron
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 to use
int '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 <doniy...@gmail.com> wrote:
>>
>>> I am reading file from url and pa
f = open('your/file/path/here')
>>> n = 0
>>> s = True
>>> while s:
>>> s = f.read(1024*1024)
>>> n += len(s)
>>> print n
>>> print 'done'
>>>
>>> That should work. If not, do
int '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 <doniy...@gmail.com
> > wrote:
>
>> I am reading file from url and parsing it and saving some information out
ation 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 giving
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
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
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
d 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 <far...@gmail.com >wrote:
>
>> Hello,
>>
>> Can someone give me an
; 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 and read the log.
>
>
> On Wed, Apr 17, 2013 at 2:38 PM, frocco <f
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 a
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
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
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?
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,
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
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 (i.e. via a cron job).
>
> Is there some setting somewhere to set the prefix?
> Can it be set via an environment variable?
> How
://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 (i.e. via a cron job
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
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 implemented
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
the mail should be different, but it
> > contains model data, and the model is aware of the current language
> > (uses get_language() to figure it out).
>
> > According to the docs
> > here:http://docs.djangoproject.com/en/dev/topics/i18n/#id2
>
> > as I have no sessi
On Dec 12, 8:33 am, pihentagy <pihent...@gmail.com> 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_C
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
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
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
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
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
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
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
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, 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
il
> > 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,
at 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
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
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
49 matches
Mail list logo