نمایش نتایج 1 تا 7 از 7

نام تاپیک: اجرای اسکریپتی خاص در پریود زمانی معیین

  1. #1

    اجرای اسکریپتی خاص در پریود زمانی معیین

    سلام
    در Cron jobs چگونه باید تعیین کنم که مثلا x.php هر ده دقیقه اجرا گردد؟
    Artists use lies to tell the truth while politicians use them to cover the truth up

  2. #2
    با عرض ادب:
    یه همچین خطی به فایل /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

  3. #3
    سلام
    مشکل اینه که من جز cpanel به چیز دیگری در وب سرور دسترسی ندارم
    Artists use lies to tell the truth while politicians use them to cover the truth up

  4. #4
    . آواتار oxygenws
    تاریخ عضویت
    دی 1382
    محل زندگی
    تهران/مشهد
    پست
    6,333
    CPanel بخشی برای cron داره (با نام cron job یا crontab)
    ایمیل من
    سایت من

    عضویت در جامعه‌ی اهدای عضو

    Direct PGP key: http://tinyurl.com/66q5cy
    PGP key server: keyserver.ubuntu.com
    PGP name to search: omidmottaghi

  5. #5
    رفتم اونجا در اون بخش اگر فقط آدرس اسکریپت رو بنویسم حله؟یا باید چیز دیگه ای وارد کنم
    Artists use lies to tell the truth while politicians use them to cover the truth up

  6. #6
    با عرض ادب:
    نقل قول نوشته شده توسط houtanal
    رفتم اونجا در اون بخش اگر فقط آدرس اسکریپت رو بنویسم حله؟یا باید چیز دیگه ای وارد کنم
    The 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

  7. #7
    tnx
    Artists use lies to tell the truth while politicians use them to cover the truth up

تاپیک های مشابه

  1. ساختن exe برنامه و تعیین آیکون آن
    نوشته شده توسط dorna1985 در بخش C#‎‎
    پاسخ: 5
    آخرین پست: سه شنبه 09 بهمن 1386, 11:52 صبح
  2. مشکل در تعیین فرم اصلی
    نوشته شده توسط fazel-d در بخش برنامه نویسی در Delphi
    پاسخ: 2
    آخرین پست: جمعه 05 بهمن 1386, 14:32 عصر

قوانین ایجاد تاپیک در تالار

  • شما نمی توانید تاپیک جدید ایجاد کنید
  • شما نمی توانید به تاپیک ها پاسخ دهید
  • شما نمی توانید ضمیمه ارسال کنید
  • شما نمی توانید پاسخ هایتان را ویرایش کنید
  •