Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-28, 07:36:58

Author Topic: How to properly set the cron job?  (Read 4473 times)

0 Members and 1 Guest are viewing this topic.

Offline want2fly

  • Junior Member
  • *
  • Posts: 49
  • Karma: +0/-0
    • View Profile
How to properly set the cron job?
« on: 2014-01-20, 07:09:04 »
Hello friends.

I need to set the cron job for my wordpress blog to run every 5 minutes. The command that I need to run is
Code: [Select]
wget -q -O - http://mydomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
What I did is went to Cron settings in KloxoMR and selected "5" in minutes tab, "all" in every other field.
Then in command field I typed the command
Code: [Select]
wget -q -O - http://mydomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
About two hours later I got an email from "Cron Daemon" that said this:
Quote
/etc/cron.daily/logrotate:

error: hiawatha:7 unknown user 'www-data'
error: found error in /var/log/hiawatha/access.log , skipping
error: pure-ftpd:1 duplicate log entry for /var/log/pureftpd.log
error: found error in /var/log/pureftpd.log , skipping

I am running the latest Kloxo-MR on the Centos 6 x32. My configuration is tinydns and apache. My php runs as "Suphp worker". My server has 2 gb ram.

Could anybody please confirm that I am setting the cron job correctly?

Thank you.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: How to properly set the cron job?
« Reply #1 on: 2014-01-20, 12:20:34 »
Go to 'admin > server > (localhost) > cron scheduled tasks > add simple'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline want2fly

  • Junior Member
  • *
  • Posts: 49
  • Karma: +0/-0
    • View Profile
Re: How to properly set the cron job?
« Reply #2 on: 2014-01-20, 17:30:05 »
Mustafa,Thank you for reply.

The cron didn't work so I was wondering if I need to change command somehow.

Is "/dev/null 2>&1" part  needs to be at the end of the url or at the beginning?

How can I check if cron is working or not?




« Last Edit: 2014-01-20, 17:35:05 by want2fly »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: How to properly set the cron job?
« Reply #3 on: 2014-01-20, 18:53:49 »
Try 'wget -q -O - http://mydomain.com/wp-cron.php?doing_wp_cron' without ' >/dev/null 2>&1'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Ann

  • Junior Member
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: How to properly set the cron job?
« Reply #4 on: 2014-01-25, 15:23:27 »
You may try online cron job service like easycron.com as a trigger.

 


MRatWork Affiliates:    BIGRAF(R) Inc.    House of LMAR    EFARgrafix
Click Here

Page created in 0.025 seconds with 18 queries.

web stats analysis