سلام
در Cron jobs چگونه باید تعیین کنم که مثلا x.php هر ده دقیقه اجرا گردد؟
سلام
در Cron jobs چگونه باید تعیین کنم که مثلا x.php هر ده دقیقه اجرا گردد؟
Artists use lies to tell the truth while politicians use them to cover the truth up
با عرض ادب:
یه همچین خطی به فایل /etc/crontab باید اضافه کنی:
00,10,20,30,40,50 * * * * root progname
در قسمت progname فایل php خود را (مثلا با آپاچی) صدا می زنید.
برای اطلاعات بیشتر:
http://www.htmlcenter.com/tutorials/...5&type=PHP
http://www.unixgeeks.org/security/ne...ix/cron-1.html
http://www.redhat.com/docs/manuals/l...cron-task.html
یه ... خفن
one of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs. -- Robert Firth
سلام
مشکل اینه که من جز cpanel به چیز دیگری در وب سرور دسترسی ندارم
Artists use lies to tell the truth while politicians use them to cover the truth up
CPanel بخشی برای cron داره (با نام cron job یا crontab)
ایمیل من
سایت من
عضویت در جامعهی اهدای عضو
Direct PGP key: http://tinyurl.com/66q5cy
PGP key server: keyserver.ubuntu.com
PGP name to search: omidmottaghi
رفتم اونجا در اون بخش اگر فقط آدرس اسکریپت رو بنویسم حله؟یا باید چیز دیگه ای وارد کنم
Artists use lies to tell the truth while politicians use them to cover the truth up
با عرض ادب:
نوشته شده توسط houtanalThe command line
This section can be any command that can be run from a command line. In this case we are setting it up to run a script.
* Path to PHP – In this section, you must specify the path to PHP or Perl, depending on what type of script you are trying to run. If you don’t know the path to PHP, then you can easily ask your server admin. Here are some examples of possible paths to PHP: /usr/bin/php, /usr/local/bin/php
* Flags for output – In this example I’ve used the –q flag which runs cron in quiet mode; this flag stops some unnecessary messages. You can also add /dev/null after the server path to stop error messages being output as well.
* Server Path to your script – You will need to specify the full server path directly to your script. If you know the path to your account, then you can simply add the remainder of the path to your actual script eg. /home/user1/public_html might be the path to your account (document root) and the script might be in sendstudio/users resulting in /home/user1/public_html/sendstudio/users/scriptname.php
http://www.interspire.com/whitepaper...n_to_Cron.html
می تونی یه همچین چیزایی بنویسی:
php -q /home/username/public_html/cron.php
wget -q -O /dev/null /home/username/public_html/cron.php
یه ... خفن
one of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs. -- Robert Firth
tnx
Artists use lies to tell the truth while politicians use them to cover the truth up