1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

running Cron jobs

Discussion in 'Plesk for Linux - 8.x and Older' started by imhere2009, Dec 29, 2005.

  1. imhere2009

    imhere2009 Guest

    0
     
    Hi

    Im trying to setup a cronjob in plesk, though they wont work, ive tried everything. Ive looked for tutorials though cant find anything that works. i have 2 php scripts, one that needs to be run every hour and one to run every midnight the link i use to my scripts is
    /home/myusername/directroy/to/my/php/file.php

    Do i need to put anything before /home or after /file.php for this to work?

    Also if anyone can help, could you please show me some examples for a cronjob to go off every hour and every midnight

    Thanks in Advance
    Steve
     
  2. imhere2009

    imhere2009 Guest

    0
     
    Bump

    Anyone please help me with this, its driving me crazy.

    Thanks
     
  3. jwdick

    jwdick Guest

    0
     
    Here is sample of a cron job that I have in plesk:

    /home/username/bin/runlogs > /dev/null 2>&1

    Min = 1
    H = *
    DM = *
    M = *
    DW = *


    I created a "bin" folder in my /home/username directory and placed a file called "runlogs" The schedule is: One minute after each hour of every day of every month for every day of the week.

    If you wanted every night at midnight, use 1 0 * * *, This would be One minute after midnight ( 00 hours ) every day/month/day of week.
     
  4. mikk

    mikk Basic Pleskian

    23
    73%
    Joined:
    Jan 29, 2005
    Messages:
    83
    Likes Received:
    0
    If you are asking how to run a php file via a crontab then this depends if you have php installed as a binary - or if you just run it as an apache module.

    If its the latter the easiest way is to use lynx

    do a

    which lynx

    to check you have it installed and the path of it then just use (alter lynx path accordingly)

    /usr/local/bin/lynx -dump http://DOMAIN/path/to/script.php

    Lynx is just a browser so just treat it as you would IE or FF.
     
Loading...