PHP에서 하나의 exmaple을 마친 후 스크립트를 실행하는 가장 좋은 방법은이 두 파일이 있습니다.아마존 S3 백업
내 백업 파일.
<?php
require 'back-up.php';
#!/bin/php -d max_execution_time = 3600
$backup_dirs = array('../bu/');
$backup = new backupclass($backup_dirs);
$backup->backup('filesys','files/');
?>
내가 내 아마존 S3 업로드 파일이 있습니다. 좋아
<?php
require_once('S3.php');
$s3 = new S3('S3KEY', 'S3SECRETKEY');
$baseurl = "/home/mlcreative/public_html/bu/files";
if ($handle = opendir('./files/')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
if ($s3->putObjectFile("files/$file", "testingmlc333", "lighthouse/$file", S3::ACL_PUBLIC_READ)) {
echo "<strong>We successfully uploaded your file.</strong>";
if (file_exists($baseurl . '/' . $file)) { unlink ($baseurl . '/' . $file); }
}else{
echo "<strong>Something went wrong while uploading your file... sorry.</strong>";
}
}
}
closedir($handle);
}
?>
그래서 그 순간에 내가 다음 시간 후에 아마존 업로드 PHP 파일을 실행 백업 PHP 파일을 실행하는 cron 작업 설정이 있습니다.
내가 묻는 것은 두 가지 대신 하나의 cron 작업 만 실행하도록 스크립트에 결합 할 수있는 방법입니다. ???
어떤 도움을 주시기 바랍니다