Metadata-Version: 1.1
Name: pyriodic
Version: Python2.7v0.2.4
Summary: A scheduler that uses dateutil to run periodic jobs.
Home-page: http://ayehavgunne.github.io/pyriodic/
Author: Anthony Post
Author-email: postanthony3000 at gmail com
License: This project uses the dateutil library written by Gustavo Niemeyer.

Copyright (c) 2014, Anthony Nelson Post <postanthony3000@gmail.com>
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Download-URL: http://ayehavgunne.github.io/pyriodic/
Description: ===
        pyriodic
        ===
        
        **pyriodic** is a scheduler written in Python using dateutil to run periodic jobs.
        
        This project was just started and is in the alpha stage so there is a lot yet to do.
        It is coded in Python 3.3; other versions of Python have yet to be tested.
        
        Usage
        =====
        
        Schedule recurring jobs by specifying at least a desired **interval** from dateutil's rrule module.
        Or schedule delayed jobs to run after any number of hours, minutes, seconds etc.
        
        Example
        -------
        ::
          from datetime import datetime
          from pyriodic.pyriodic import Scheduler, HOURLY, MINUTELY
        
          print('Program starting at', datetime.now())
          sched = Scheduler()
          message = 'Hello from argumentland.'
        
          def run_test1(mes):
            print('This is test 1.', mes, datetime.now())
        
          sched.add_recuring_job(run_test1, args=(message,), interval=MINUTELY)
        
          # or use a decorator!
          @sched.schedule_recuring_job(interval=HOURLY, start_time='12:30:45 PM')
          def run_test2():
            print('This is test 2.', datetime.now())
        
          run_test2()
        
        Output
        ------
        
        Program starting at 2014-05-24 21:19:34.029764
        
        This is test 1. Hello from argumentland. 2014-05-24 21:19:34.528792
        
        This is test 1. Hello from argumentland. 2014-05-24 21:20:00.000249
        
        This is test 2. 2014-05-24 21:20:15.000107
        
        This is test 1. Hello from argumentland. 2014-05-24 21:20:59.999681
        
        This is test 2. 2014-05-24 21:21:14.999539
        
        Intervals included are:
          * yearly (haven't had the **time** to test this one out yet)
          * monthly (nor this one)
          * daily
          * hourly
          * minutely
          * secondly
        
        Other parameters include:
          * *string* **start_date** (defaults to today's date)
          * *string* **start_time** (defaults to midnight)
          * *integer* **how_many** intervals to run (default is infinite)
          * *integer* **retrys** upon exceptions (default is 3 times)
          * *integer* **retry_delay** seconds to delay next run time after exception (default is 10  seconds right now)
          * *string* **name** the name that the job can then be refered to as (defaults to function name)
        
        Start dates and times are parsed by dateutil so it is flexible in what it excepts.
        
        Go to https://github.com/Ayehavgunne/pyriodic for more information.
        
        Todo
        ====
        
        1. Add support for Weekly Intervals
          1. Add day_of_week option (currently there but doesn't do anything yet)
          2. Add ``weekly`` to the list of accepted intervals
        2. Add timezone awareness
        3. Add logging capability
        4. Add more options for error handling
          1. Add option for a waiting time before the next function call after an exception - Done!
          2. Add option for the number of retrys after exceptions - Done!
          3. Maybe add the option to execute a different function upon an exception
        5. Add docstrings
        6. Add options for retrieving the return values
          1. Add capturing of return variables into an OrderedDict (keys are the datetime that the return value was captured) for each job - Done!
          2. Add option for maximum number of stored return values
        7. Named Jobs - Done!
        
        Changelog
        =========
        
        Version 0.2
        -----------
          * Organized code a bit
          * Added named jobs
          * Added rudimentary capability to retrieve the return values from each job
          * Added ability to limit job to x number of failures and to set the delay after an exception
        
        Version 0.1
        -----------
          * Initial Release
Keywords: schedule periodic job task time timer thread calendar clock queue dateutil
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Programming Language :: Python :: 2.7
Classifier: Intended Audience :: Developers
Requires: dateutils
