~wattazoum/python-schedule/devel

« back to all changes in this revision

Viewing changes to src/schedule/__init__.py

  • Committer: Oumar Aziz OUATTARA
  • Date: 2008-04-27 12:52:10 UTC
  • Revision ID: wattazoum@wattazoum-laptop-20080427125210-hhzlsohyva603el6
at implements scheduler

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
 
 
3
class Job:
 
4
        """
 
5
        Python schedule job.
 
6
        
 
7
        This class is used to represent a Job in a Scheduler
 
8
        """
 
9
        # Job ID
 
10
        id = None
 
11
        #command to execute (can be multiline)
 
12
        command = None
 
13
        # Scheduler (the name of the scheduler used for this Job)
 
14
        scheduler = None
 
15
        # The user name . os.getlogin()
 
16
        user = None
 
17
        # the date for the job to be executed (see http://docs.python.org/lib/datetime-datetime.html )
 
18
        date = None
 
19
        # the periodicity (The periodicity of the Job)
 
20
        periodicity = None
 
21
        
 
22
        # Optional info 
 
23
        title = None 
 
24
        icon = None
 
25
        timestring = None
 
26
        timestring_show = None
 
27
        preview = None
 
28
 
 
29
 
 
30
class Scheduler :
 
31
        
 
32
        def getName(self):
 
33
                """
 
34
                The scheduler name
 
35
                """
 
36
                raise Exception("Not implemented")
 
37
        
 
38
        def append(self,job):
 
39
                """
 
40
                Append a job to the scheduler
 
41
                """
 
42
                raise Exception("Not implemented")
 
43
        
 
44
        def update(self,job):
 
45
                """
 
46
                Update a job in the scheduler
 
47
                """ 
 
48
                raise Exception("Not implemented")
 
49
        
 
50
        def delete(self,job):
 
51
                """
 
52
                Delete a job in the scheduler
 
53
                """
 
54
                raise Exception("Not implemented")
 
55
        
 
56
        def list(self):
 
57
                """
 
58
                list all the job available in the scheduler
 
59
                @return: a list of Job
 
60
                """
 
61
                raise Exception("Not implemented")
 
62