Drupal Cron Jobs - How to Setup Cron in Drupal

in Drupal, Planet Drupal

Ever get the status message "cron has not run", from the Drupal status page? In this video I show you how to setup a cron job that fires "www.yoursite.com/cron.php" every hour, so you don't have to run cron manually ever again. Drupal cron jobs made easy!

Drupal Cron Jobs - Notes

When you run crontab -e, you may need to be logged in as the administrator user of your web server.

Cron can be setup to run a command more or less than once an hour. In the video we add the following line to our crontab file to run cron.php at the start of every hour.

0 * * * * /usr/bin/wget -O - -q -t 1 http://www.yoursite.com/cron.php

The 5 characters separated by spaces controls when cron will run the command on the right. Lets break it down with some ascii art:

* * * * * command
| | | | |
| | | | |_day of week (0-6) where Sunday is 0
| | | |
| | | |_month (1-12)
| | |
| | |_day of month (1-31)
| |
| |_hour (0-23)
|
|_minute (0-59)

So say you wanted to run cron.php once every day. The following line would run your drupal cron job every night at midnight:

0 0 * * * /usr/bin/wget -O - -q -t 1 http://www.yoursite.com/cron.php

The next line would run the drupal cron job every day at 2:30pm, or 14:30 military time:

30 14 * * * /usr/bin/wget -O - -q -t 1 http://www.yoursite.com/cron.php

Lets run cron every Sunday and Wednesday at 3am:

0 3 * * 0,3 /usr/bin/wget -O - -q -t 1 http://www.yoursite.com/cron.php

This allows for lots of flexibility in when you'd like to run your drupal cron job.

Comments

monica's picture

Great post

I was very pleased to find this site.I wanted to thank you for this great read!
http://quinnaksesoris.com/
http://obatpenyakitjantungkoronerherbal.blogspot.com/
http://distributortasly.com/

kevin678's picture

Regularly, you might set up a

Regularly, you might set up a cron work through your web host's administration, for example, through cpanel. Then again, starting with Drupal 7, a preinstalled module gives you a chance to set up cron occupations from inside Drupal itself; you don't need to utilize cpanel any longer. Moreover, you can plan a cron work from any web-available workstation that offers access to your website Electrical Contractor in Glendale AZ please feel free to visit our site.

Anonymous's picture

I'm gladsome to adult so

I'm gladsome to adult so another useful plus educational crowd on your website.
high pr blog comment service

Anonymous's picture

These storys enjoy got

These storys enjoy got definitive feel minus confusing the lecturers.
work from home

owais's picture

You got a really useful blog

You got a really useful blog I have been here reading for about an hour. I am a newbie and your success is very much an inspiration for me. network marketing

Anonymous's picture

i am interested this info

Movies Pennsylvania

Keep sharing such excellent post like this in future too. Informative and good article. I like it very much. Have very interesting content to read out,You may post on the plug ins for the blog. You could send it's exclusive. The blog rundown shall extend your financial numbers.

owais's picture

You got a really useful blog

You got a really useful blog I have been here reading for about an hour. I am a newbie and your success is very much an inspiration for me. Email Lists For Sale

owais's picture

You got a really useful blog

You got a really useful blog I have been here reading for about an hour. I am a newbie and your success is very much an inspiration for me. Email Lists For Sale

william max's picture

The purpose of this kind of

The purpose of this kind of write-up is usually to provide the specifics of coping with the particular overall performance and also scalability quotient of a Drupal CMS. This may be a well known proven fact that Drupal Electrical Contractor in Surprise AZ might be by far the most scalable and also adjustable articles administration practice on-line.

http://howlastlongerinbed.net's picture

In this video I show you how

In this video I show you how to setup a cron job that fires "www.yoursite.com/cron.php" every hour, so you don't have to run cron manually ever again.
http://howlastlongerinbed.net

william max's picture

The purpose of this kind of

The purpose of this kind of write-up is usually to provide the specifics of coping with the particular overall performance and also scalability quotient of a Drupal CMS. This may be a well known proven fact that Drupal Electrical Contractor in Surprise AZ might be by far the most scalable and also adjustable articles administration practice on-line.

william max's picture

The purpose of this kind of

The purpose of this kind of write-up is usually to provide the specifics of coping with the particular overall performance and also scalability quotient of a Drupal CMS. This may be a well known proven fact that Drupal Electrical Contractor in Surprise AZ might be by far the most scalable and also adjustable articles administration practice on-line.

william max's picture

The purpose of this kind of

The purpose of this kind of write-up is usually to provide the specifics of coping with the particular overall performance and also scalability quotient of a Drupal CMS. This may be a well known proven fact that Drupal Electrical Contractor in Surprise AZ might be by far the most scalable and also adjustable articles administration practice on-line.

william max's picture

The purpose of this kind of

The purpose of this kind of write-up is usually to provide the specifics of coping with the particular overall performance and also scalability quotient of a Drupal CMS. This may be a well known proven fact that Drupal Electrical Contractor in Surprise AZ might be by far the most scalable and also adjustable articles administration practice on-line.

rock's picture

rock

Reflective, unheard of data files help a number of us evident there after, the actual means woman or person pressuring the amount concerning pastimes joined with triumphs which might the majority of us are available concerning concerning mixed up inside items in addition to services other locations as well as your procedure. freedebtconsolidationquotes.com

asd's picture

asd

I love to surf and my initial source for information is the blogs which have always helped me in my education. salonfurnish.com

Anonymous's picture

nice information

historic country resort between Siena and Florence
I have been surfing online more than three hours today, yet I never found any interesting article like yours. It is pretty worth enough for me. In my view, if all site owners and bloggers made good content as you did, the web will be a lot more useful than ever before

jams's picture

The above post is dedicated

The above post is dedicated to a very important topic, I found this article very helpful.

Anonymous's picture

i am interested this blog

gay friendly luxury resort Tuscany
I am often to running a blog and i really admire your content. The article has really peaks my interest. I am going to bookmark your site and hold checking for brand new information.

descargar counter strike 1.6's picture

In this video I show you how

In this video I show you how to setup a cron job that fires "www.yoursite.com/cron.php" every hour, so you don't have to run cron manually ever again.
descargar counter strike 1.6

jams's picture

The above post is dedicated

The above post is dedicated to a very important topic, I found this article very helpful.

Anonymous's picture

I really like this web page,

I really like this web page, you are very excellent creating them,every headline is very awesome and very fatastic idea.

Anonymous's picture

Your Field of Specialization

Your Field of Specialization and Conjecture Ideas Some lore assiduousnesss choice solicit you to tell about your broad or field of speculate. buy thesis online.com These asks are decrepit to determine how well you capture your area of specialization another let you’re absorbed in it.

Anonymous's picture

I continuously livelihood on

I continuously livelihood on upcoming to your parcel again retributory in containerful you have posted new list.
the smoke advisor

Anonymous's picture

I really like this web page,

I really like this web page, you are very excellent creating them,every headline is very awesome and very fatastic idea.

Anonymous's picture

seo service

I really like this web page, you are very excellent creating them,every headline is very awesome and very fatastic idea.

Anonymous's picture

will run the command on the

will run the command on the right. Lets break it down with some ascii art:bit of it and I have you bookmarked to check out new stuff of your blog a must read blog!!!!
Two and a Half Men Seasons 1-10 DVD Box Set
Lie to Me Seasons 1-3 DVD Box Set
The Tudors Seasons 1-4 DVD Box Set
CSI Las Vegas Seasons 1-13 DVD Box Set
CSI: NY Seasons 1-9 DVD Box Set
How I Met Your Mother Season 8 DVD Box Set

jams's picture

I don't cerebrate some of

I don't cerebrate some of websites offer this typewrite of assemblage.

In case's picture

rock

In case you have advised definitely merchandise together with elements you may make use of, take a look at that may can easily receive which could balanced these types of within the merchandise dissertation. rivet blog

Anonymous's picture

I witness the greatest

I witness the greatest capacitys on your blog further I indeed caress lesson them.
free microsoft points

Anonymous's picture

I’m inspired beside the

I’m inspired beside the surpassing also preachy listing that you prepare in such unimportant timing.
maddi manevi tazminat

Life Experience Degrees's picture

great

I really like this web page, you are very excellent creating them,every headline is very awesome and very fatastic idea.it was very useful. I look ahead in studying more of your work.

ankurs127's picture

I have been researching this

I have been researching this subject for a few days now for a report I am writing. Your post has been very helpful in this regard. Thanks for another great post.
ecift

Life Experience Degrees's picture

Interesting

Your post has been very helpful in this regard. Thanks for another great post.

Jhon Smith's picture

Informative Information

I want you to thank for your time of this wonderful read!!! I definately enjoy every little bit of it and I have you bookmarked to check out new stuff of your blog a must read blog. online pc technical support

Jhon Smith's picture

Informative Information

I want you to thank for your time of this wonderful read!!! I definately enjoy every little bit of it and I have you bookmarked to check out new stuff of your blog a must read blog. online pc technical support

buy provestra's picture

buy provestra

Nice to be visiting your blog again, it has been months for me. Well this article that i’ve been waited for so long.buy provestra

ankurs127's picture

Why is it that the Bible

Why is it that the Bible appears so unfavorable to females? Some congregations even hold up the marital state of a woman (i.e., divorced or not) while to whether or not a woman can genuinely advance within the denomination's power structure.
bible

datting's picture

Awesome

Very interesting points you have noted , thankyou for putting up. "Curiosity is the key to creativity." by Akio Morita.

local hot |

Anonymous's picture

Interesting information I

Interesting information I haven’t been through such information in a long time.
my site here

hotwoman's picture

Awesome

I think this site holds very good written written content blog posts.
sexy local singles | sex partners |

pikalaina 2014's picture

In this video I show you how

In this video I show you how to setup a cron job that fires "www.yoursite.com/cron.php" every hour, so you don't have to run cron manually ever again.
pikalaina 2014

Anonymous's picture

Outstanding blog you mans

Outstanding blog you mans possess preserved there, I completely valuate the dint.
pearly papule

john's picture

This is great! It really

This is great! It really shows me where to expand my blog. I think that sometime in the future I might try to write a book to go along with my blog, but we will see.Good post with useful tips and ideas. examcollection C_TBW45_70 - examcollection HP0-Y30

siaran tv bola online nobartv.com's picture

nonton siaran live tv bola online nobartv.com

Nonton Siaran TV Bola Online http://goo.gl/P9u3mx di NOBARTV.COM
Kabar Berita Bola Online Terbaru Hari Ini http://goo.gl/lErqKY di NOBARTV.COM
Kumpulan Jadwal Pertandingan TV Bola Online http://goo.gl/QkgLyy di NOBARTV.COM
Kumpulan Kabar Berita Harian Bola Online Terbaru http://goo.gl/b278O2 di NOBARTV.COM

Anonymous1's picture

I am glad to see that they

I am glad to see that they offering this work here. I see so many people being able to get so much from this. I hope you keep this going in the future. So many great options here. I think the things you covered through the post are quite impressive, good job and great efforts. I found it very interesting and enjoyed reading all of it. keeps it up, good job. The Newsroom seasons 2 DVD Box Set | Cold Case Seasons 1-7 DVD Box Set | NCIS Seasons 1-10 DVD Box Set | Grey's Anatomy Seasons 1-9 DVD Box Set | True Blood Seasons 1-6 DVD Box Set

Anonymous1's picture

I want you to thank for your

I want you to thank for your time of this wonderful read!!! I definately enjoy every little bit of it and I have you bookmarked to check out new stuff of your blog a must read blog!!!! It's good to know that the Dimagi and DataDyne have created a CIC office. I believe it is of great help to them to have their on office. Criminal Minds Seasons 1-8 dvd box set | Game of Thrones Seasons 1-3 DVD Box Set | The Closer Season 1-7 dvd box set | The L Word Seasons 1-6 DVD Box Set | House MD Seasons 1-8 dvd box set

Anonymous's picture

Your stipulations don't

Your stipulations don't banish near the bushes punish t to the moiety.
bubblegum casting legitimate

Anonymous's picture

controls when cron will run

controls when cron will run the command on the right. Lets break it down with some ascii art:Great blog! Is your theme custom made or did you download it from somewhere? A design Two and a Half Men Seasons 1-10 DVD Box Set
Lie to Me Seasons 1-3 DVD Box Set
The Tudors Seasons 1-4 DVD Box Set
CSI Las Vegas Seasons 1-13 DVD Box Set
CSI: NY Seasons 1-9 DVD Box Set
How I Met Your Mother Season 8 DVD Box Set

Anonymous's picture

The post is written in a very

The post is written in a very good manner and it entails much useful information for me. I am happy to find your distinguished way of writing the post. Cron can be setup to run a command more or less than once an hour. In the video we add the following line to our crontab file to run cron.php at the start of every hour.
supernatural seasons 1-8|Criminal Minds|The Simpsons Seasons 1-24

Powered by Drupal, an open source content management system