SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Cron help

  1. #1
    SitePoint Zealot p2ranger's Avatar
    Join Date
    Jan 2001
    Location
    Colorado, USA
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cron help

    This is my first time to use cron. I'd appreciate some direction.

    I have a php file to get news feeds that I want to run once a day. So I created a file called cron_getnews.txt that holds the cron information below:

    Code:
    00*** /usr/local/zeus/site/php3/php3 /home/p2ranger/www/XML_work/get_rss_feed.php > /dev/null 2>&1

    When I type crontab cron_getnews.txt I get the following output:

    Code:
    00*** /usr/local/zeus/site/php3/php3 /home/p2ranger/www/XML_work/get_rss_feed.php > /dev/null 2>&1
    crontab: error on previous line; unexpected character found in line.
    crontab: errors detected in input, no crontab file generated.

    There is no previous line. Makes no sense to me

    Am i even doing this correctly?

    Thanks

    Jason
    ><>

  2. #2
    Procrastinator Extraordinaire lucas's Avatar
    Join Date
    Oct 2000
    Location
    Springfield, Missouri, U.S.A.
    Posts
    320
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    when it says previous line, its just referring to the line of code you put in.

    i don't really know that much about cron jobs, i've just started playing with them myself, but since this forum is so slow, i thought i would kick at it a little bit.

    so your basically just trying to copy a file from one location to another right? so why are there three locations on that line?

  3. #3
    SitePoint Zealot p2ranger's Avatar
    Join Date
    Jan 2001
    Location
    Colorado, USA
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for replying

    I'm not wanting to copy anything. What I have is what I saw in another forum from my host's site about running cron jobs. It may be that I'm doing this wrong.


    All I am wanting to do is run a php script called
    get_rss_feed.php
    one time a day.

    the way I understand it is that I have to tell it where the PHP interpreter is so it can run the PHP script. Is this right?

    Thanks

    Jason
    ><>

  4. #4
    SitePoint Member
    Join Date
    Oct 2002
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    use spaces like so

    0 0 * * *

    ge

  5. #5
    SitePoint Zealot p2ranger's Avatar
    Join Date
    Jan 2001
    Location
    Colorado, USA
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cool, well it didn't give me the error after putting in the spaces. thanks a bunch.

    Now to see if itactually works

    Thanks

    Jason
    ><>


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •