"PHP crontab 보여주기"의 두 판 사이의 차이

17번째 줄: 17번째 줄:
<source lang='php'>
<source lang='php'>
<?php
<?php
exec('crontab -l 2>&1', $output);
exec('crontab -l -uroot 2>&1', $output);
echo '<xmp>';
echo '<xmp>';
print_r( $output );
print_r( $output );

2015년 2월 9일 (월) 14:09 판

PHP crontab 보여주기

1 방법 1: apache계정의 크론탭

<?php
exec('crontab -l 2>&1', $output);
echo '<xmp>';
print_r( $output );
echo '</xmp>';
// Array
// (
//     [0] => no crontab for apache
// )

2 방법 2: root계정의 크론탭

<?php
exec('crontab -l -uroot 2>&1', $output);
echo '<xmp>';
print_r( $output );
echo '</xmp>';
// Array
// (
//     [0] => must be privileged to use -u
// )

3 같이 보기

4 참고 자료

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}