I have a task: you need to add a line to the crontab by a command and create several folders on the server. For this, as I understand it, you need to write a server script. But I still need to pass parameters to it and execute it on command. How to do it right?

OS - Debian 8, the site is written in Yii2

    1 answer 1

    The site is written in Yii2 . oh ..

    in general, in order to add something to the crontab (which has long been replaced by systemd-timers), certain rights are needed.

    and are you sure you need it? It may be easier for you to revise the idea and create 1 script for crown spinning on php that will run along the elements you need. And the elements themselves, you will write using any other php with http.

    And the fact that you want to do this is to do a mini application running in the background, listening to tcp (any socket) (the open port often costs money) and receiving data. + it's safe ... not.