crunzphp / crunz

A PHP-based job scheduler
MIT License
177 stars 16 forks source link

Running task in sequence #30

Closed gabbykweka closed 2 years ago

gabbykweka commented 2 years ago

I been trying to run task in serialize manner. Meaning after the first task is done should run another schedule task. Is this possible? Using the after function seems to fail with error Call to a member function isRunning() on null

The second command depends on the result processed from the first command.

PabloKowalczyk commented 2 years ago

Hello, Crunz is designed to run all tasks in parallel (same as Cron), so there is no way to "run task after other taks", but you can use Unix's &&, for example mkdir test && cd test, or you can write PHP script that will run two commands.

The second command depends on the result processed from the first command.

In this case Unix's pipe | looks like ideal candidate.

gabbykweka commented 2 years ago

Thank you for the feedback! Will test the && and see the output of it!