M
M
maiskiykot2018-07-24 21:44:23
Task Schedulers
maiskiykot, 2018-07-24 21:44:23

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

1 answer(s)
A
Artem Kiryanov, 2018-07-25
@hacker342

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 question

Ask a Question

731 491 924 answers to any question