-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | tiny no-brainer job scheduler -- -- this is a tiny library to make scheduling jobs to run at predetermined -- intervals, easier @package tiny-scheduler @version 0.1.1.2 -- | Time Interval Data Type to use to schedule jobs, (Secs, Minutes, -- Hours, Days), coupled along with convenience function to convert -- datatype to a rational number. Please note this data type guards -- against negative time which will result in 0 -- -- Additionmultiplicationdivision's resultant type instance will -- determined by the left operand -- -- Sec x + Day y = Sec z Day x + Minute y = Day z module TinyScheduler.Time data Interval Secs :: Rational -> Interval Minutes :: Rational -> Interval Hours :: Rational -> Interval Days :: Rational -> Interval Weeks :: Rational -> Interval intervalToSecs :: Interval -> Rational instance GHC.Show.Show TinyScheduler.Time.Interval instance GHC.Classes.Eq TinyScheduler.Time.Interval instance GHC.Num.Num TinyScheduler.Time.Interval -- | Main Datatype to hold information about a job, and function to -- calculate thread delay module TinyScheduler.Jobs -- | Main datatype to hold job Information data Job a Job :: Int -> UTCTime -> Interval -> Int -> IO a -> Job a [id] :: Job a -> Int [startDate] :: Job a -> UTCTime [interval] :: Job a -> Interval [hits] :: Job a -> Int [job] :: Job a -> IO a -- | this is the thread delay, calculated as [unit: microseconds)] -- (startTime - currentTime) + (interval * multiplier) calculateDelay :: UTCTime -> UTCTime -> Interval -> Int -> [Int] module TinyScheduler.SubJobs convertJobIntoSubJobs :: UTCTime -> Job a -> [SubJob a] execSubJobs :: [SubJob a] -> IO [a]