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.

Are Cron jobs automated?

Discussion in 'General Discussion' started by GoWilkes, Jan 19, 2016.

  1. GoWilkes

    GoWilkes Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    OK, this was weird. I've been working on this script for a new account, but it's not live yet. The main script is located at:

    /home/username/www/cron/

    I moved the account to a new server on Saturday, Jan 16, and haven't touched it since. I haven't set the cron up yet; I plan to, but just haven't done it yet.

    I just now logged in to work on it, and found in the error log that the script last ran this morning (Jan 19) at 9:35am! There was no one even in the office with access to it at that time!

    I'm at a loss, because the only way it should run is if I had logged in and manually ran it... which I didn't.

    My only other thought, is there something automated in cPanel that says to run any PHP script located in a /cron/ directory on a certain schedule? I looked at "Configuration cPanel Cron Jobs" in WHM and didn't see anything like that, but it's really the only explanation I can think of.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. GoWilkes

    GoWilkes Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    That's the thing, though; I never configured the cron on either server!

    I don't have a domain name for it, so the only way it could have been accessed by browser is if someone typed in a pretty random looking address:

    http://rando.example.com/~rando2/cron/curl_multi.php

    ("rando" and "rando2" aren't the real names, of course)

    The first part of the script downloads close to 2G of data from a remote server, and would time out if ran through the browser. the 2G of data DID download, though, so it had to have been ran by command line. I'm the only one working on it, though, and no one should have even been in the office at 9:35am, so... I'm at a loss.

    I looked at /var/log/cron (thanks, Michael!) and don't see anything related to it, but there are a lot of scripts that I don't recognize in a cron (like test -x). Unless one of those scripts have a built-in command to search for /cron/ directories, I just have no idea what caused it to run.

    It's not a tragedy, the script is finished now so I'll be setting up the cron this evening anyway. It's just the darned weirdest thing.
     
Loading...

Share This Page