I am working on a chat app and for this I have used the redis lists to store chat messages, now I want my messages to be save in the DB table, so for this I need to run redis command every minute and get all the data from redis list to my db table, now this can be done using the schedule cron job which is fine, so now is there any way like any command like artisan to call itself after some interval of time ? May be command line application would work ?
@ vikramjeets I am already using the queues and have the priorities set, so how can supervisor may help me in this ?
Also using the chat i am storing the data in redis list like this redisClient.lpush('chat',JSON.stringify(chatObj),function (err, res) {});
and at server side I used to get the list contents like this $allData = \Redis::lrange('chat',0,-1); so is there any way using the supervisor can help me in this, I mean as the chat message gets pushed onto the list then I should be able to know and get it from the redis list and save it in my DB.