Windows path for django_crontab

745 views
Skip to first unread message

sarfaraz ahmed

unread,
Jan 18, 2015, 9:54:08 PM1/18/15
to django...@googlegroups.com
Hello All,

I am trying to use django_crontab to run repetitive task. I want to insert records to database on a particular time. Also, I am in process of learning django hence I m trying to reach every aspect of django. 

The issue i am facing i m able to configure django_crontab but its not able to find cron.py. I am using windows 7 and i believe it must be something else for windows

CRONJOBS = [
    ('*/5 * * * *', 'dms.Drop_Slot_Management.cron.my_scheduled_job')
]

dms is my project directory.

When I run the command manage.py crontab add it gives error saying "The system cannot find the path specified."

I am using Windows. 

Please help..

Regards,
Sarfaraz Ahmed

Mike Dewhirst

unread,
Jan 18, 2015, 11:25:17 PM1/18/15
to django...@googlegroups.com
On 19/01/2015 8:54 AM, sarfaraz ahmed wrote:
> Hello All,
>
> I am trying to use django_crontab to run repetitive task. I want to
> insert records to database on a particular time. Also, I am in process
> of learning django hence I m trying to reach every aspect of django.
>
> The issue i am facing i m able to configure django_crontab but its not
> able to find cron.py. I am using windows 7 and i believe it must be
> something else for windows

There is no cron/crontab on Windows. You need a Linux operating system
for crontab and for testing django-crontab.

You could install a Linux machine on Windows using Virtualbox or use
some other VM hosting solution. Or repurpose an old piece of hardware
you might have floating about.

If you want to go into production on Windows you will have to manually
schedule the jobs you want. There may be utilities out there which will
let you interface with the Windows scheduling system.

>
> CRONJOBS = [
> ('*/5 * * * *', 'dms.Drop_Slot_Management.cron.my_scheduled_job')
> ]
>
> dms is my project directory.
>
> When I run the command manage.py crontab add it gives error saying "The
> system cannot find the path specified."
>
> I am using Windows.
>
> Please help..
>
> Regards,
> Sarfaraz Ahmed
>
> --
> 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
> <mailto:django-users...@googlegroups.com>.
> To post to this group, send email to django...@googlegroups.com
> <mailto: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/9ad0f430-458f-4113-b6be-2d61ab3ec447%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/9ad0f430-458f-4113-b6be-2d61ab3ec447%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Edgar Gabaldi

unread,
Jan 18, 2015, 11:51:52 PM1/18/15
to django...@googlegroups.com
To do periodic tasks you can use celery[1]. I believe that on windows works fine.



To post to this group, send email to django...@googlegroups.com
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.

sarfaraz ahmed

unread,
Jan 19, 2015, 4:12:49 AM1/19/15
to django...@googlegroups.com
Thanks for replies I really wish people who posted packages should mention clearly about which OS it;s going to work. I ended up wasting two workdays in experimenting with kronos,DJANGO-CHRONOGRAPH,DJANGO-CRONJOBS,DJANGO-CRON.

Surprisingly, DJANGO cron says that it is meant for Windows hosting where user does not have access to setup the cron jobs. I tried that to... nothing runs.... 

Regards,
Sarfaraz Ahmed



Michael Manfre

unread,
Jan 19, 2015, 2:33:03 PM1/19/15
to django...@googlegroups.com
If you don't end up using Celery, another option for a periodic action is to create a management command and schedule it to run with Task Scheduler (http://msdn.microsoft.com/en-us/library/windows/desktop/aa383614%28v=vs.85%29.aspx).

Regards,
Michael Manfre
Reply all
Reply to author
Forward
0 new messages