FutureWeb
1 year ago

Trigger an artisan command when endpoint is hit then another when that is complete

Posted 1 year ago by FutureWeb

Hiya LaraFolks,

I am looking to trigger an artisan command when an end point is hit and then another when that command is complete.

here's the plan..

1). I fire a command using a cron twice a day at specific time this generates some data on another server and saves the output to a file. -> This I have done.

2). The server responds once complete to an end point on my server I provide a unique single use token in my call back and check the ip of the responding server. -> This is done also

3). When this end point is hit and validation is passed I want to trigger another artisan command to download the data.

4). Then once the data has downloaded I want to trigger another command which parses it.

I have written and tested all the commands I just need to figure out how to trigger 3 and 4 any help would be very much appreciated.

Please sign in or create an account to participate in this conversation.