if (file_exists(__DIR__ . '/123.txt')) {
$file = file_get_contents(__DIR__ . '/123.txt');
$file = json_decode($file, true);
if (!isset($file["service_2"])) {
}
}$file["service_2"], если да, то я делаю действие, иначе я должен сделать sleep(20) и повторять действие в течении 10 раз.