1. Forum używa plików Cookies. Dowiedz się więcej o celu ich używania i możliwości zmiany ustawień Cookies w przeglądarce. Czytaj więcej...

ROZWIĄZANE How can i add crone jobs ?

Dyskusja w 'Hosting i domeny internetowe' rozpoczęta przez użytkownika Roopan, 30 Maj 2015.

  1. Roopan

    Roopan Początkujący

    Wiadomości:
    6
    Docenione treści:
    0
    How can i add crone jobs?
     
  2. Roopan

    Roopan Początkujący

    Wiadomości:
    6
    Docenione treści:
    0
    Can somebody help me here?
     
  3. Grzesiek

    Grzesiek Centrum Pomocy home.pl

    Wiadomości:
    3 660
    Docenione treści:
    333
    To use the cron at the root of accounts place the script with the name of principles:

    cron- [hourly | daily | monthly | weekly]. [extension]

    More information can be found in the documentation (https://pomoc.home.pl/baza-wiedzy/cykliczne-uruchamianie-cron/ - you can use google translator) or by typing in Google: cron

    For what cron will run, it corresponds to its content.
     
  4. Mariusz

    Mariusz pomoc.home.pl Moderator forum

    Wiadomości:
    3 087
    Docenione treści:
    302
    for example:

    file with name „cron-daily.php” will be running at 1:15 AM
    file with name „cron-13.php” will be running at 01:00 PM
    file with name "cron-01.php" will be running at 01:AM
     
  5. Roopan

    Roopan Początkujący

    Wiadomości:
    6
    Docenione treści:
    0
    How can i run the command "php5 / path / to / file / command params" in every 5 minutes.

    What would be the content of the file cron-5min.php?

    Thanks in advance
    Roopan.
     
    Ostatnia modyfikacja: 3 Czerwiec 2015
  6. Mariusz

    Mariusz pomoc.home.pl Moderator forum

    Wiadomości:
    3 087
    Docenione treści:
    302
    cron-[xx]min.[extension]

    cron-5min.php - will be running every 5 minutes.

    You must upload this file to the root directory server: "/" on FTP or "/public_html/" on SFTP
     
  7. Roopan

    Roopan Początkujący

    Wiadomości:
    6
    Docenione treści:
    0
    If i uploaded the file with content
    <? php

    exec ('/ public_html / php yii mailbox');

    ?>

    The command will work?

    I want to execute a Linux command (my own corn command job) on the server.
    If so what i need to include in exec () to execute php files?


    Actually I need to run "php yii mail-box" command in every 5 minutes.
     
  8. TheL

    TheL @Lider VIP Beta-tester

    Wiadomości:
    2 403
    Docenione treści:
    535
    use the command system()
     
  9. Mariusz

    Mariusz pomoc.home.pl Moderator forum

    Wiadomości:
    3 087
    Docenione treści:
    302
    @Roopan You can run the linux command with:

    Kod:
    exec('command')
    or
    Kod:
    system('command')

    If you want to execute PHP code:
    Kod:
    system('php54-cli php-code');

    You can also execute phpini() command from cron and save the result to a file to know what is the our server environment.

    in the bottom left corner of the web page, you can change the forum interface language:

    [​IMG]
     
    Ostatnia modyfikacja: 3 Czerwiec 2015
  10. Roopan

    Roopan Początkujący

    Wiadomości:
    6
    Docenione treści:
    0
    Yup, I got it working, Thanks for your help. :)
     

Poleć forum znajomym