All Projects → jupitern → Scheduler

jupitern / Scheduler

Licence: MIT license
PHP Simple Scheduler - set occurrence expressions and get next x execution dates [Cron, Crontab, Task Scheduler]

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to Scheduler

legacy-bottlerockets
Node.js high availability queue and scheduler for background job processing
Stars: ✭ 25 (+0%)
Mutual labels:  schedule
CloudSimPy
CloudSimPy: Datacenter job scheduling simulation framework
Stars: ✭ 144 (+476%)
Mutual labels:  schedule
OPoster
Scheduling Platform for Social Media Networks. Powered by Orienteer
Stars: ✭ 31 (+24%)
Mutual labels:  schedule
Saber-Bot
A discord bot to manage schedules & calendars with discord notifications.
Stars: ✭ 30 (+20%)
Mutual labels:  schedule
DNTScheduler.Core
DNTScheduler.Core is a lightweight ASP.NET Core's background tasks runner and scheduler
Stars: ✭ 44 (+76%)
Mutual labels:  schedule
serverless-local-schedule
⚡️🗺️⏰ Schedule AWS CloudWatch Event based invocations in local time(with DST support!)
Stars: ✭ 68 (+172%)
Mutual labels:  schedule
Torrent-Alert
Torrent Keyword Search, Schedule & Alert #BuildWithMeteorJS
Stars: ✭ 21 (-16%)
Mutual labels:  schedule
async cron
crontab for python,with asyncio
Stars: ✭ 23 (-8%)
Mutual labels:  schedule
aws-tag-sched-ops
Retired, please see https://github.com/sqlxpert/lights-off-aws
Stars: ✭ 24 (-4%)
Mutual labels:  schedule
kube-install
一鍵安裝部署高可用的多kubernetes集羣(二進位離線方式),支持定時安裝、添加與銷毀node、銷毀與修復master、一鍵卸載集羣等。One click offline installation of highly available multiple kubernetes cluster, supports schedule installation, addition of nodes, rebuild of kubernetes master, and uninstallation of clusters.
Stars: ✭ 336 (+1244%)
Mutual labels:  schedule
DNN.Events
DNN Events manages display of upcoming events as a list in chronological order or in calendar format with additional information. This Github repo is used for source management and releases.
Stars: ✭ 26 (+4%)
Mutual labels:  recurring-events
croner
Trigger functions and/or evaluate cron expressions in JavaScript. No dependencies. Most features. All environments.
Stars: ✭ 169 (+576%)
Mutual labels:  schedule
triggerable
Trigger/automation engine for ActiveRecord models
Stars: ✭ 18 (-28%)
Mutual labels:  schedule
Timespace
A jQuery plugin to handle displaying of time events
Stars: ✭ 27 (+8%)
Mutual labels:  schedule
ld-scheduler
Schedule Launch Darkly flags on or off
Stars: ✭ 14 (-44%)
Mutual labels:  schedule
genshin-schedule
🕑 Genshin farming scheduler
Stars: ✭ 74 (+196%)
Mutual labels:  schedule
scheduled-pod-autoscaler
Custom Kubernetes controller for GitOps native scheduled scaling
Stars: ✭ 20 (-20%)
Mutual labels:  schedule
watchman
📆 更夫(watchman)是一款可视化的定时任务配置 Web 工具,麻麻不用担心我漏掉任何更新啦!
Stars: ✭ 40 (+60%)
Mutual labels:  schedule
angular-gantt-schedule-timeline-calendar-example
Angular gantt-schedule-timeline-calendar usage example
Stars: ✭ 15 (-40%)
Mutual labels:  schedule
react-gantt-schedule-timeline-calendar
React Gantt Schedule Timeline Calendar component wrapper for gantt-schedule-timeline-calendar [ react gantt, gantt, react gantt chart, react schedule, react timeline, react calendar, gantt, schedule, scheduler, timeline, calendar, react gantt chart ]
Stars: ✭ 47 (+88%)
Mutual labels:  schedule

Build Status Scrutinizer Code Quality Latest Stable Version Latest Unstable Version License

jupitern/scheduler

PHP Scheduler.

add one time event dates or recurring event dates get next event date or next X event dates from a given date

Requirements

PHP 5.4 or higher.

Installation

Include jupitern/scheduler in your project, by adding it to your composer.json file.

{
    "require": {
        "jupitern/scheduler": "1.*"
    }
}

Usage

// instance Scheduler
$schedules = \Jupitern\Scheduler\Scheduler::instance()

// limit events from 08.00 am to 17.00
->setTimeFrame('08:00', '17:00')

// add a one time event date
// accepts any string compatible with php DateTime object
->add('2020-01-01 12:35')

// add another one time event date
// accepts any string compatible with php DateTime object
->add('2020-01-01 17:50')

// add a recurring date
// accepts any string compatible with php DateTime object
->addRecurring('+ 8 hours')

// get next schedule starting at 2020-01-01
->getNextSchedule('2020-01-01 00:00:00', 10);

// get next 5 schedules starting at 2020-01-01
->getNextSchedules('2020-01-01 00:00:00', 10);

// display schedules
foreach ($schedules as $schedule) {
    echo $schedule->format('Y-m-d H:i')."<br/>";
}

Examples

$schedules = \Jupitern\Scheduler\Scheduler::instance()
    ->add('2030-01-01 12:35')
    ->add('2030-01-01 14:50')
    ->addRecurring('+2 hours')
    ->getNextSchedules('2030-01-01 00:00:00', 10);

foreach ($schedules as $schedule) {
    echo $schedule->format('Y-m-d H:i').'<br/>';
}

/*
output:
2030-01-01 00:00
2030-01-01 02:00
2030-01-01 04:00
2030-01-01 06:00
2030-01-01 08:00
2030-01-01 10:00
2030-01-01 12:00
2030-01-01 12:35
2030-01-01 14:00
2030-01-01 14:50
*/

$schedules = \Jupitern\Scheduler\Scheduler::instance()
    ->setTimeFrame('08:00', '17:00')
    ->add('2030-01-01 12:35')
    ->add('2030-01-01 14:50')
    ->addRecurring('+2 hours')
    ->getNextSchedules('2030-01-01 00:00:00', 10);

foreach ($schedules as $schedule) {
    echo $schedule->format('Y-m-d H:i').'<br/>';
}

/*
output:
2030-01-01 08:00
2030-01-01 10:00
2030-01-01 12:00
2030-01-01 12:35
2030-01-01 14:00
2030-01-01 14:50
2030-01-01 16:00
2030-01-02 08:00
2030-01-02 10:00
2030-01-02 12:00
*/


$schedules = \Jupitern\Scheduler\Scheduler::instance()
    ->setTimeFrame('08:30', '19:00')
    ->add('+10 minutes')
    ->add('+30 minutes')	// outside time frame. will not produce any schedule
    ->add('next day 08:30')
    ->getNextSchedules('2000-12-16 18:40');

foreach ($schedules as $schedule) {
    echo $schedule->format('Y-m-d H:i')."<br/>";
}

/*
output:
2000-12-16 18:50
2000-12-17 08:30
*/

ChangeLog

v1.3

  • Changed method add to allow relative one time events like "+1 hour" or "next day 17:00"
  • relative events added with method add() are relative to $fromStartDate and obey time frame if set

Contributing

  • welcome to discuss a bugs, features and ideas.

License

jupitern/scheduler is release under the MIT license.

You are free to use, modify and distribute this software

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].