Answer the question
In order to leave comments, you need to log in
CentOS and crontab glitch... running task multiple times in 1 minute?
cron log
May 29 09:30:01 brandage CROND[22306]: (web3) CMD (/usr/bin/php -f ***/web/work/7style.php)
May 29 09:50:01 brandage CROND[22443]: (web3) CMD (/usr/bin/php -F ***/web/work/modamio.php >> ***/web/work/modamioerr.log)
May 29 10:00:01 brandage CROND[22480]: (web3) CMD (/usr/bin/php -F ***/web/work/modamio.php >> ***/web/work/modamioerr.log)
May 29 10:00:01 brandage CROND[22481]: (web3) CMD (/usr/bin/php -F ***/web/work/7style.php)
May 29 10:10:01 brandage CROND[22708]: (web3) CMD (/usr/bin/php -F ***/web/work/modamio.php >> ***/web/work/modamioerr.log)
*/30 * * * * /usr/bin/php -F ***/web/work/7style.php
*/10 * * * * /usr/bin/php -F ***/web/work/modamio.php >> ***/web/work/modamioerr.log
# date
Thu May 29 12:17:29 MSK 2014
May 28 19:30:01 brandage CROND[11874]: (web3) CMD (/usr/bin/php -f ***/web/work/7style.php)
May 28 19:30:01 brandage CROND[11872]: (web3) CMD (/usr/bin/php -f ***/web/work/7style.php)
Answer the question
In order to leave comments, you need to log in
at */10 it should run once every 10 minutes.. so cron has only 10 hours now... how so?
May 29 09:50:01 ...
May 29 10:00:01
May 29 10:10:01
<?php
$file='/var/www/xxx/status/sms_st.lock';
if(!flock($lock_file = fopen($file, 'w'), LOCK_EX | LOCK_NB))
die("Already running\n");
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question