It's my first question in the forum, I tell you because I want to do this, I have a little program with a view in html to redirect the incoming calls from one phone number to another, we select the date / time of passage, recipient and finally when the calls return
The program makes a passage of variables with strtotime and date and saves them together with the chosen recipient in crontab format in a file datos.txt
The data.txt file is displayed, for example:
00 20 22 5 0 root /root/pasar_a_emma
30 22 22 5 0 root /root/volver_a_la_oficina
As the program is not finished, I copy the contents of datos.txt and paste it into the crontab, which executes the scripts pasar_a_emma and volver_a_la_oficina in the day and time that I write to you
The question is that I need other people to make this call through the html, then one of my ideas was to save the data in a bash file and the crontab check it every time
* * * * * root /var/www/html/script.sh
For this, although it sounds a bit dirty, I would need the crontab to run this script.sh with crontab content in some way, because the crontab can not be written directly and in case they need to check or modify the passage again I will have to use an accessible file, which can be viewed with html
I appreciate any contribution! Greetings