Hi,
i am looking for a way where i can execute a task at a particular date and 
time, i tried apscheduler for this purpose but i am finding some difficulty 
while integerating with django. can anyone help me with this
the flow is
user will specify a particular date and time through GUI --> submit --> the 
task will be executed at the particular date and time the user mentioned
i have tried the following in django (Apscheduler approach)

import time
from datetime import datetime
from apscheduler.scheduler import Scheduler
import os
def func1(self,exec_date):
    from_time = datetime.datetime.strptime("2014-05-29 13:56:59",'%Y-%m-%d 
%H:%M:%S')
    self.exec_date = datetime.datetime ( 
from_time.year,from_time.month,from_time.day,from_time.hour,from_time.minute)
    return exec_date
sched = Scheduler()
sched.start()
def my_job(test,exec_date):
    print test
    os.system("python C://Python27/Lib/idlelib/tim.py")
job = sched.add_date_job(my_job,exec_date, ['hello'])


the issue i am facing is the input that the user gives (date n time) is in 
forms.py ,i have written the code for apscheduler in views.py and i call 
the function through urls.py but the code doesn't really seem to work,can 
anyone suggest me how apscheduler works with django or guide me with some 
links which give information about that

Thanks in advance

Thanks and regards 
Rini

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/ba02dd8d-a705-4b0d-a238-a5d4e7934a41%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to