Skip to main content

Why doesn't this Cronjob instruction run?

Comments

7 comments

  • cPRex Jurassic Moderator
    Hey there! Inside /var/log/cron, you should see entries similar to the following when you edit the user's cron jobs: Jan 16 07:36:08 host crontab[196369]: (hattmonk) LIST (username) Jan 16 07:36:10 host crontab[196375]: (hattmonk) LIST (username) Jan 16 07:36:30 host crontab[196388]: (hattmonk) LIST (username) Jan 16 07:36:30 host crontab[196389]: (hattmonk) REPLACE (username) Jan 16 07:36:30 host crontab[196391]: (hattmonk) LIST (username)
    If you see those, that at least tells you the cron job is saving properly from the cPanel interface. When the job is executed, you'll see the following entry: Jan 16 07:37:01 host CROND[196416]: (hattmonk) CMD (your-cron-command-here)
    Do you see that show up in the log file?
    0
  • martin MHC
    Hi @cPRex thanks for the help there. My cron's log last entry for this is: Jan 16 00:15:01 basic CROND[4487]: (account) CMD (/usr/local/bin/php /home/account/crons/error_cleaner.php >/dev/null 2>&1)
    And nothing since then. Expecting 0815 and 1215 (time here now is 1403) The most recent records in this file are: Jan 16 12:15:02 basic crontab[14752]: (account) LIST (account) Jan 16 12:15:04 basic crontab[14872]: (account) LIST (account)
    Which is the correct sort of time (hh:15) but may possibly be co-incidence of when I was exploring the issue.
    0
  • martin MHC
    Also of interest is I'm seemingly unable to post messages on this forum containing / var / log / cron string (without spaces); with a popup saying forum has run into a problem
    0
  • cPRex Jurassic Moderator
    Yeah, that's the Cloudflare forum protection. It seems to be overly aggressive lately with file paths. Just to confirm, you added the cron through the cPanel interface, correct?
    0
  • martin MHC
    Just to confirm, you added the cron through the cPanel interface, correct?

    Yes, entirely through the CPanel account interface. Thanks.
    0
  • cPRex Jurassic Moderator
    You mentioned it works when run from the command line - are you logged into SSH as the cPanel user when trying this? If so, I don't have any other ideas on why that isn't working, so it's likely time to make a ticket.
    0
  • martin MHC
    You mentioned it works when run from the command line - are you logged into SSH as the cPanel user when trying this?

    I am using the WHM terminal (as root). I will raise a ticket and feedback the conclusion. Thanks. :)
    0

Please sign in to leave a comment.