Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    905
    Thanks
    23
    Thanked 5 Times in 5 Posts

    Cron job help...

    hey there
    ok so im working on a script that is all cool and stuff and works fine.. but it needs to run every hour... i know that cron can automaticly run the script every hour.. but how?
    would it be from a diferent script?
    cheers
    sir p

  • #2
    Regular Coder Feyd's Avatar
    Join Date
    May 2002
    Location
    Los Angeles, CA Maxim: Subvert Society
    Posts
    404
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Check this answer from the old forums...( I don't feel like re-typing it)

    http://www.codingforums.com/ubb/Forum5/HTML/004755.html
    Moderator, Perl/CGI Forum
    shadowstorm.net - subvert society

  • #3
    New Coder
    Join Date
    Jul 2002
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hey,
    here's a simple, and short , tutorial on crontab, http://www.superscripts.com/tutorial/crontab.html

    Depending on how your system is setup, you normally do 1. crontab -l > crontabfile.edited 2. edit the file, add a two digit number for the second, a two digit number for the hour, then for the day, month, and day of the week, then the script. It would look something like this

    00 * * * * ..../cgi-bin/yourscript.cgi ( this would run every hour on the hour )

    finally 3. crontab crontabfile.edited ( this copies crontabfile.edited to the current list of scripts that cron should run )

    check and see if you're script got added to the list, crontab -l.

    Anyways the tutorial is really good, and does alot better job of explaining than I did.


  •  

    Posting Permissions

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