Hello,
I have some artisan commands which delete some data from a database and perform a curl request to fetch and populate the database with data.
What I need is to make them run in order, when one has finished, I need another to start.
Now, I have a schedule running in Kerner.php but I reckon that things get messed up and my webserver doesn't populate until I restart it.
Right now I have the commands runing at xx:xx the other one at xx:xx+2 etc.
I think that I have to make a command that runs on xx:xx and calls all the commands one after the other, but I don't know how to do it.
If command 1 doesn't return anything your second command May fire before the first one is up. Either call the second coo mad after the first in your first command or return true false for the first that will allow the second to run when true.
@Terumi Unless your artisan command exits prematurely, yes.
Basically the same idea as this, for example:
git clone git@github.com:laravel/framework.git; cd framework; ls
Obviously you couldn't cd into the directory before it's created and the repo cloned there.. that example would clone the laravel framework repo, cd into it, and then run an ls to display the contents.. same idea, really.