Most frustrating Drupal encounter thusfar (and hopefully ever!)

Branjawn's picture

So, I don't even know where to begin.

I am importing iCal feeds (Google Calendar specifically) using FeedAPI, Calendar, iCal parser, Date, etc, etc. I had some crazy issues that are mostly resolved now. But my one hangup I cannot remedy.

Cron will not stop running. In other words, I cannot run cron because it won't stop. If I try to run it manually I get the "Cron run Failed" or something like that.

I have done everything with deleting the cron variables, emptying cache, sacrificing small animals, hung a horseshoe over my pc, all to no avail.

So, does anyone have experience with importing iCal feeds? Does anyone have experience with the cron that never ends? It just goes on and on my friend..



regi.bradley's picture

I have had the same problem with cron. Deleting the cron variables alone did not solve the problem for me either. If I remember correctly, I was able to get mine resolved by deleting the cron semaphore from the variables table followed by an immediate clearing of the cache.

Chron semaphore is what you need

afreeman's picture

Actually the cron job dies when your timeout limit is hit, unfortunately this often leaves the cron semaphore set in the variables table, which fakes cron.php into thinking there's an active cron running.

+1 on deleting cron semaphore. That should allow you to re-run cron. Incidentally if you're having issues with long-running crons, timeouts, etc, you might want to take a serious look at running cron from the commandline:

Cron Semaphore

Branjawn's picture

Allow me to clarify, when I stated "deleting the cron variables" I meant cron semaphore and cron last from the variables table.

So, yes, I've done this already and it has not resulted in success.

Also, on my status page it displays this now: Cron maintenance tasks - Never run

hands off

Branjawn's picture

I think I might try not touching it for a few hours and check back. Perhaps I'm just throwing too much at the site/server at once in my effort to cure it.

Again, the initial cause of this is importing a new feed. Does that matter?


kwinters's picture

If you can't finish a whole process in a single PHP execution, you need to break it up into bits and schedule it with something like array_slice or Otherwise it will just break every time you run it.

You can also set your max execution time to be way high, but that's not really a long-term solution and often just results in running out of memory.

Ken Winters


Branjawn's picture

I have figured out that some events import with
and others have only

Could this be messing things up?


Branjawn's picture

SUMMARY:Friday Nite Worship - High Point

new info

Branjawn's picture

More info, read this somewhere:

The default value type for DTSTART is DATE-TIME, but
20060315 is not a DATE-TIME; you can use DATE values in
DTSTART, but you have to be explicit:


So, I'm trying to import the same field DTSTART as Date and Datetime? Could that be screwing things up? If so, there is nothing I can do about it right? Because the feed is generated by Google Calendar and I have no control over that...

cron nightmare

Branjawn's picture

This is still the bane of my existence.

feeling lucky?

tarvid's picture

You may have a mismatch in date modules or misconfiguration in time zones.


Branjawn's picture

I got the timezones issue worked out. Google sends as UTC -4 and I don't mess with it. So when it gets imported it's fine. At first I was time zoning it twice, so the times were off by 4 hours. Figured that one out pretty easy.

What would I check in the date module? I think the problem is for all day events the DTSTART is "date" and for regular events it is "datetime". The field I am importing to, by way of the Date module, only lets you choose one of those, so I choose "datetime".

Date module

tarvid's picture

Several items under trouble shooting.

Your analysis makes sense. One Drupal principle not well understood is that if you install enough modules your site will break.

yyyymmdd is both a date and a datetime. The time happens to be midnight. The Z-zulu suffix selects UTC. Without any tz, Drupal should use the site default.

Drush is your friend. Usually I wind up with a compatible set of modules. I did bang my head on date and views a few months ago and went back to event.

Do try to reach ekes on IRC.


swordedge's picture

The host of a site that I am maintaining is not allowing cron to run in any of the three methods I am aware of. So, to replace it, I ended up using poormanscron. Everytime someone accesses the site, it checks to see how long it was since the last person accessed the site and if it has been long enough, it runs the cron process. Sounds like a kludge but it works.

How to stop hung up cron jobs in Drupal

Alexander Allen's picture

My cron also hung up while I was running it with cron.
I updated it to the latest cron 3.1 version and I still got the same problem.

To resolve:

  • Stop Apache (if you have the rights).
    I tried to delete the cron variables from drush without stopping Apache and got a "bus error".
  • Delete cron_semaphore, cron_last, ctools_last_cron, node_cron_last
  • Start Apache (if you stopped it).
  • Run cron!

If you have Drush installed (and I highly recommend so), you can do this in just few seconds like I did. If you have a Dreamhost server like I do you can check this post here.


Group events

Add to calendar

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week