전원이 꺼 졌을 때 어떻게 기능을 실행합니까?전원이 꺼지기 전에 기능 실행
// need to make sure here that poweroff command is executed successfully before calling senEmail function
$output = exec('poweroff', $output, $return);
if (!$return) {
// command executed successfully
// now send email before poweroff completes its process
sendEmail();
}
sendEmail()
은 이미 종료되었으므로 트리거되지 않습니다.
수 없습니다. poweroff 명령을 실행하기 전에 메일을 보낼 수 있습니다. –
@ Karthikeyan.R.S, Aw! 너무 슬프다. 다른 방법이 있습니까? – Defyleiti