Cron Job

44 views
Skip to first unread message

Chris Norman

unread,
Oct 14, 2015, 10:24:49 AM10/14/15
to django...@googlegroups.com
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 the server's cron demon to do this, so I
can't work it in the way I just described. I tried using combinations of
pipe characters, but to no avail.

Is there some way I can programatically simulate the shell yielded by
manage.py? Or is there a smarter way of running the cron job from within
Django it's self?

Thanks in advance,

Vijay Khemlani

unread,
Oct 14, 2015, 10:27:38 AM10/14/15
to django...@googlegroups.com
The easiest way would be using a custom management command




--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/561E5E70.3060901%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.

Chris Norman

unread,
Oct 14, 2015, 11:45:46 AM10/14/15
to django...@googlegroups.com
Hi,
Thanks for the advice.

I actually found that just after writing my post. Now the cron job works perfectly.

Thanks,
Reply all
Reply to author
Forward
0 new messages