g4 / tasker
Application asynchronous tasks manager and runner, cron-like PHP implementation with ability to run tasks with resolution in seconds
Installs: 48 873
Dependents: 0
Suggesters: 0
Security: 0
Stars: 14
Watchers: 12
Forks: 8
Open Issues: 0
Requires (Dev)
- g4/code-coverage: 1.*
- phpunit/phpunit: 5.*
Suggests
- php-amqplib/php-amqplib: Use RabbitMQ for task processing
- dev-master
- 2.20.0
- 2.19.0
- 2.18.3
- 2.18.2
- 2.18.1
- 2.18.0
- 2.17.4
- 2.17.3
- 2.17.2
- 2.17.1
- 2.17.0
- 2.16.1
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.3
- 2.12.2
- 2.12.1
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.1
- 2.8.0
- 2.7.2
- 2.7.1
- 2.7.0
- 2.6.0
- 2.5.1
- 2.5.0
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.1
- 2.3.0
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.6
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.0
- 1.7.6
- 1.7.5
- 1.7.4
- 1.7.3
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.1
- 1.6.0
- 1.5.1
- 1.5.0
- 1.4.1
- 1.4.0
- 1.3.1
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.1
- 1.0.0
- 0.16.1
- 0.16.0
- 0.15.3
- 0.15.2
- 0.15.1
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.0
- 0.11.0
- 0.10.8
- 0.10.7
- 0.10.6
- 0.10.5
- 0.10.4
- 0.10.3
- 0.10.2
- 0.10.1
- 0.10.0
- 0.9.2
- 0.9.1
- 0.9.0
- 0.8.1
- 0.8.0
- 0.7.2
- 0.7.1
- 0.7.0
- 0.6.4
- 0.6.3
- 0.6.2
- 0.6.1
- 0.6.0
- 0.5.11
- 0.5.10
- 0.5.9
- 0.5.8
- 0.5.7
- 0.5.6
- 0.5.5
- 0.5.4
- 0.5.3
- 0.5.2
- 0.5.1
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.1
- 0.2.0
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
This package is auto-updated.
Last update: 2024-12-06 15:17:08 UTC
README
Tasker - Application asynchronous tasks manager, cron-like PHP implementation with ability to run task in seconds (unlike cron in minutes)
Requires
- MySQL tables
CREATE TABLE tasks ( task_id BIGINT(20) UNSIGNED AUTO_INCREMENT, recu_id INT(10) UNSIGNED NOT NULL DEFAULT 0, identifier VARCHAR(255) NOT NULL DEFAULT '', task VARCHAR(255) NOT NULL DEFAULT '', data TEXT, request_uuid CHAR(36) NOT NULL DEFAULT '', status TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, priority TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, ts_created INT(10) UNSIGNED NOT NULL DEFAULT 0, ts_started INT(10) UNSIGNED NOT NULL DEFAULT 0, exec_time FLOAT(10,6) UNSIGNED NOT NULL DEFAULT 0.000000, started_count TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (task_id), KEY (recu_id), KEY (priority), KEY (status), KEY pending (status, ts_created), KEY started_count (started_count) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE tasks_recurrings ( recu_id INT(10) UNSIGNED AUTO_INCREMENT, frequency VARCHAR(255) NOT NULL DEFAULT '', task VARCHAR(255) NOT NULL DEFAULT '', data TEXT, status TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, priority TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (recu_id), UNIQUE (task), KEY (status) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE tasks_error_log ( tel_id INT(10) UNSIGNED AUTO_INCREMENT, task_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, identifier VARCHAR(255) NOT NULL DEFAULT '', task VARCHAR(255) NOT NULL DEFAULT '', data TEXT, ts_started INT(10) UNSIGNED NOT NULL DEFAULT 0, date_started DATETIME DEFAULT NULL, exec_time FLOAT(10,6) UNSIGNED NOT NULL DEFAULT 0.00, log TEXT, PRIMARY KEY (tel_id), KEY (task_id), KEY (identifier), KEY (task), KEY (ts_started), KEY (date_started), KEY (exec_time) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `tasker_pool` ( `hostname` varchar(255) NOT NULL DEFAULT '', `status` tinyint(3) unsigned NOT NULL DEFAULT '0', `ts_available` int(10) NOT NULL DEFAULT '0', PRIMARY KEY (`hostname`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- Sample data
INSERT INTO tasks_recurrings (task, frequency, data, status) VALUES ('Dummy\\Task\\Foo', '0 3-59/15 2,6-12 */15 1 2-5', '{\"foo\":123}', '1'), ('Dummy\\Task\\Bar', '0 */5 * * * *', '{\"bar\":234}', '1'); # runs every 5 minutes
License
(The MIT License) see LICENSE file for details...