Cron? Anyone?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Cron? Anyone?

Owen Winkler
Hi folks, simple question:

Where in the 2.1 source is wp_cron() called?  wp_cron() being the
function that primes the cron engine by calling spawn_cron().  And
spawn_cron() creates a socket to request wp-cron.php, which executes the
hooks that have expired timestamps.

At this point, having written a few posts on 2.1, I would expect that I
would see a couple of "wp-cron.php" entries in my apache logs, since
various things are set to happen via wp-cron (like pinging) when you
post a new entry.

Maybe I'm blind?  Or was there something I was supposed to do to enable
this?

Owen



_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cron? Anyone?

Peter Westwood
On Fri, April 7, 2006 3:03 pm, Owen Winkler wrote:
> Hi folks, simple question:
>
> Where in the 2.1 source is wp_cron() called?  wp_cron() being the
function that primes the cron engine by calling spawn_cron().  And
spawn_cron() creates a socket to request wp-cron.php, which executes the
hooks that have expired timestamps.
>
> At this point, having written a few posts on 2.1, I would expect that I
would see a couple of "wp-cron.php" entries in my apache logs, since
various things are set to happen via wp-cron (like pinging) when you
post a new entry.
>
> Maybe I'm blind?  Or was there something I was supposed to do to enable
this?

Scanning through my local phpxref'd copy of the trunk source it looks like
wp-cron is called on the "init" hook if we are currently not already doing
cron (see /wp-includes/default-filters.php lines 89-90).

Whether or not anything currently uses cron is another question.
Looking around there does seem to be a number of references to
wp_schedule_single_event - notably for pings and future posts.

I've just tried a future post on my test blog - now I wait to see if it
turns up....

westi
--
Peter Westwood <[hidden email]>
http://blog.ftwr.co.uk



_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cron? Anyone?

Owen Winkler
Peter Westwood wrote:
> Scanning through my local phpxref'd copy of the trunk source it looks like
> wp-cron is called on the "init" hook if we are currently not already doing
> cron (see /wp-includes/default-filters.php lines 89-90).

Ah-HA!  That'll teach me for searching for /wp_cron\s*\(/ instead of
/wp_cron(\b|\s*\()/

> Whether or not anything currently uses cron is another question.
> Looking around there does seem to be a number of references to
> wp_schedule_single_event - notably for pings and future posts.
>
> I've just tried a future post on my test blog - now I wait to see if it
> turns up....

Hmm.  I think I'm 0 for 2 today on the regexes.  I checked my logs again
and wp-cron.php is present several times over the past three days.  Who
knows what I was doing before...  I must need a vacation.

In any case, future posting wasn't working for me a few weeks ago,
perhaps before masquerade's cron updates.  Can you confirm that it does now?

Owen
-trying to reclaim some utility from this "the sky is falling" thread.

_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cron? Anyone?

Peter Westwood
Owen Winkler wrote:

> Peter Westwood wrote:
>> Scanning through my local phpxref'd copy of the trunk source it looks
>> like
>> wp-cron is called on the "init" hook if we are currently not already
>> doing
>> cron (see /wp-includes/default-filters.php lines 89-90).
>
> Ah-HA!  That'll teach me for searching for /wp_cron\s*\(/ instead of
> /wp_cron(\b|\s*\()/
>
:-)

>> Whether or not anything currently uses cron is another question.
>> Looking around there does seem to be a number of references to
>> wp_schedule_single_event - notably for pings and future posts.
>>
>> I've just tried a future post on my test blog - now I wait to see if it
>> turns up....
>
> Hmm.  I think I'm 0 for 2 today on the regexes.  I checked my logs
> again and wp-cron.php is present several times over the past three
> days.  Who knows what I was doing before...  I must need a vacation.
>
> In any case, future posting wasn't working for me a few weeks ago,
> perhaps before masquerade's cron updates.  Can you confirm that it
> does now?
>
I have a number of these as well.

The future post i posted earlier failed and left the cron option empty
now :-(

I have rescheduled it to see if it goes this time - I'll let you know!

westi
--
Peter Westwood <[hidden email]>

http://blog.ftwr.co.uk



_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cron? Anyone?

Robert Deaton
In reply to this post by Owen Winkler
On 4/7/06, Owen Winkler <[hidden email]> wrote:
> In any case, future posting wasn't working for me a few weeks ago,
> perhaps before masquerade's cron updates.  Can you confirm that it does now?

I can confirm that it does, although I wrote it, so I can't guarantee
it works on other setups. I've yet to try more than a 30 second test
on an apache2/mod_php setup, and I've done nothing with
apache2/mod_cgi or mod_fastcgi. Other environments untested include
anything on Windows, so if anyone can't get this to work, let me know
and I'll try to get a test environment on a given OS/setup to give it
a shot. I'll also be around on IRC in the -dev channel for a bit if
anyone wants to discuss this and we can squash bugs if there are any.

--
--Robert Deaton
http://somethingunpredictable.com

_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Loading...