The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to cron job?

Discussion in 'General Discussion' started by dachooch, Mar 15, 2010.

  1. dachooch

    dachooch Registered

    Joined:
    Mar 15, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I am a newbie with cpanel and cron jobs.
    i want to be able to set automatic database and backup files for my site every day or week or month.
    How do I do that? What is the cron job syntax for such a thing?
    thanks
     
  2. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Are you an end user (cpanel only) or a server owner (cpanel / whm)?
     
  3. damiancds

    damiancds Registered

    Joined:
    Sep 7, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    medusa
    I too, would like to know how to do this.

    every once in a while I'll backup my stuff, but I'd like it automated or scheduled for weekly or monthly.

    I'd guess I'm an end user (I'm pretty sure i only have cpanel (version 11.24.4-STABLE) because I've never seen the whm)

    I have no idea what a cron job is but I've been looking for automated backups and some people have mentioned scripts. (I got lost because I have no idea of how to install a script into cpanel)

    if you could shed some light on the matter, I'd greatly appreciate it.

    thanks,
     
  4. pspekrins

    pspekrins Registered

    Joined:
    May 2, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Also a newb, but a smart one (?)

    I also am new to cron jobs and would like to know how to schedule them.

    I am a WHM user.

    I am sending a job to
    /usr/bin/curl

    but I get error saying no such directory.

    I am sure it's something simple and I am just not sure what to do.

    Any advice would be appreciated, I know you are busy so thanks for your time.
     
  5. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Does /usr/bin/curl exist?

    Type the following command:

    Code:
    # which curl
    You should see something like this:

    Code:
    # which curl
    /usr/bin/curl
    If the path returned is not /usr/bin/curl, then you will need to adjust the path in your cron job.

    If you see no output, then you need to install curl. On a Red Hat or CentOS server, /usr/bin/curl is provided by the curl RPM package, and you should be able to install it using yum:

    Code:
    # yum install curl
    Please note that the curl package that provides /usr/bin/curl is not related to the curl PHP extension that can be built into PHP using EasyApache. The RPM package provides the functionality from the command line prompt. The option in EasyApache builds it into PHP. The two are distinct.
     
Loading...

Share This Page