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
    Senior Coder
    Join Date
    Feb 2003
    Location
    Ontario, Canada
    Posts
    1,223
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Monthly Cron Job: How?

    I've got CPanel, and I have a file in my virtual server's root (www/file.php) and would like it to run at the beginning (or end, if that's better) of every month.

    I've read tutorials and whatnot to try to do it myself, but none of my attempts worked.

    Thanks a bunch for any help, in advance

  • #2
    New Coder
    Join Date
    Jul 2003
    Location
    London
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,

    I will assume you are running a version of cron tab on a linux box.

    A single cron tab entry is broken up as:

    Min Hour Day Of Month Month Day Of Week Command
    * * * * * ./cmd

    (An asterix typicaly means 'of every')


    to run a command on the hour every hour:

    0 * * * * ./cmd (i.e on the 0 minute of every hour of every day ...)

    to run the command once a month:
    0 0 0 * * ./cmd

    Always test your cron entries, because mistakes can be embarrassing

    I hope this helps

  • #3
    Senior Coder
    Join Date
    Feb 2003
    Location
    Ontario, Canada
    Posts
    1,223
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks Will try that.


  •  

    Posting Permissions

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