If it is, is there a way to run a modified cron that would pertain only to scheduler?

My site is quite large, and I plan to have scheduled nodes become published approx every 15 minutes - and I do not want cron running that frequently.

Thanks

CommentFileSizeAuthor
#5 scheduler.module_p137389_0.patch1.05 KBAjK

Comments

AjK’s picture

Assigned: Unassigned » AjK
Category: support » feature
mstef’s picture

Just to extend the question: If i were to run cron, say every 15-20 minutes, on a site with 2000 nodes and growing very fast, a very large amount of modules, pretty good traffic (25k pages/day) - what would I expect in terms of performance, etc?

AjK’s picture

Based on that desription I would expect bugger all performance degredation even if you cronned every minute. Unless your webserver is using a 1MHz Z80 processor or somet ;)

mstef’s picture

By "bugger all performance degredation" you mean it shouldn't matter much at all?

What if that traffic/activity doubles, triples? It is a community site, a lot of logged in users..

Still would much much more rather a separated cron if possible.

THANKS

AjK’s picture

Status: Active » Needs review
StatusFileSize
new1.05 KB

"bugger all" == not much performance costs.

Patch attached for your request. Please test it and if it works I'll commit it. This patch adds the url scheduler/cron to your system to just run scheduler's cron system. (e.g. http://example.com/scheduler/cron ). Patch is for Drupal 4.7

mstef’s picture

Wow..that was extremely nice and extremely fast. Thanks a lot.

I will test it out shortly, and get back to you.

mstef’s picture

IT WORKS..and seems to work perfectly. I will test it in more depth in the next few days.

Again, you really went out of your way and I really appreciate it. Thank you very much.

Mike

mstef’s picture

With cron, I should just use wget to invoke it right?

mstef’s picture

And one more quick question:

Does this mean that regular cron will still invoke scheduler's actions? I run cron every hour, so it would be pointless to have both execute at the same time, correct?

THANKS

AjK’s picture

Thanks for the feedback, let me know when it's RTBC by changing this issue status to "patch (ready to be committed)".

Yes, I use, for example, wget thus : 31 * * * * /usr/local/bin/wget -O - -q "http://example.com/cron.php"

Yes, a "normal" cron run will invoke schedulers cron system also.

regards,
--Andy

mstef’s picture

Allow me to confirm that this patch works amazingly. Absolutely no problems, which is a first for anything I've ever used. It has been implemented on my site and I completely changed the format of my production site because of this. It runs 24 hours a day, submitting 2-3 nodes per hour. Thank you again - very much.

vm’s picture

Status: Needs review » Reviewed & tested by the community

Ajk needed you to change the status when you felt this was Ready To Be Committed (RTBC) so that he can commit the patch to the next release : )

consdering you report nothing but good news, I'll change the status of this message for you, so that Ajk can finish his work with it.

mstef’s picture

Status: Reviewed & tested by the community » Needs review

One more question I was meaning to ask...

I have put together a pretty cool system with scheduler on my site, for myself and my users. When users submit nodes I added some PHP to my node.tpl.php to display a "status" for each node. If I haven't looked at it yet, it says "Pending Approval", if I've accepted it (unchecked In Moderation) it says "Approved", and if i've set a scheduled time for it (Checked Promoted) it says "In Queue". So I was wondering if there is a variable I can use in node.tpl.php that will display the scheduled release time, so users can know when their node is being published.

Thanks yet again.

AjK’s picture

Status: Needs review » Fixed

Patch committed.

@Mike: please don't play with the issue status like that, if you have a question then please open a new issue.

@VeryMisunderstood: thanks ;)

mstef’s picture

Oh I am sorry - I was unaware I had to actually change it myself. I have never influenced a module patch.

Thanks again.

Anonymous’s picture

Status: Fixed » Closed (fixed)