Answer the question
In order to leave comments, you need to log in
How to run a chain of scripts in cron?
There is a need to run a chain of scripts in cron. One script fulfills - should cause another. So far, it works like this: script1 -> script2 -> script3 and that's it. The transition is performed by include "script.php". What could be wrong and how is it guaranteed to execute the entire chain of scripts - 5 pieces?
Answer the question
In order to leave comments, you need to log in
So write a script in Powershell or the same bash and add it to the cron
Type:
#!/bin/sh
LIST="/path/to/my/site/dir"
CONFIG="/usr/bin/php "
for i in $ LIST
do
. "${CONFIG}${i}/test.php"
done
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question