walkor / walkor/crontab

How to execute multiple crontab inside onWorkerStart .

Open
#14 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
70
Forks
12
PR merge metrics
No merged PRs in 30d

Description

```
$crontab_worker->onWorkerStart = function ($crontab_worker) use ($app) {
new Crontab('0 0 * * *', $app->boot('/article/sitemap/main'),'sitemap');
new Crontab('*/15 * * * *', $app->boot('/multimedia/migration'),'migration_image');
new Crontab('*/19 * * * *', $app->boot('/article/migration'),'migration_article');
};
````

as you can see, if we execute multiple crontabs there, the memory usage keeps increasing. I am not sure if it's the right way to execute multiple crontab all at once.

![Snipaste_2023-12-27_20-16-54](https://github.com/walkor/crontab/assets/5647317/7a80b24e-bd41-44bd-9ed9-a67128eae0bf)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.