UBB.Dev
Posted By: caymuc CRON JOB 'faking' HACK - 02/25/2001 2:50 PM

HI

I had an idea of faking a cron job (which is nothing more than an automatic call at a given time my scripts?), as I don't have access to my ISPs cron jobs.

Hi everyone,

I want to 'hack' the wwwthreads.php and the categories.php with some lines of code that do the following:

Check when doexpire.pl has been run the last time.
* If the current time is after 2 AM and it has not been running on the current date yet:
* Run do expire.php
* Remember the time it was run.

So an user action starts the cronjobs instead an automatic serverside program.

The consequence is that
1. no action if no user that day (which is fine)
2. summaries by email not on a regular time but just somtimes a day (which is better than nothing :)
3. The poor user that starts the whole thing, has maybe some delays because the system has other things to do... (which is tolerable, I think)

I just started with PHP one week ago, wen I bought the WWWTHREADS licence I also bought one of those books.
So I am still a bloody amateur, is anybody of you pro's interested to help me developing this ad-on,
so for future releases a user can set up in config.main.php, whether he wants the 'real' ot the 'fake' cron jobs to run?

I am very curious what you all think about that idea...








Carl
darkwebforum
Posted By: kimroan Re: CRON JOB 'faking' HACK - 02/25/2001 8:15 PM
Sounds a great idea.[]/w3timages/icons/smile.gif[/] Would love to see the be immplement.

Posted By: Magicia Re: CRON JOB 'faking' HACK - 03/14/2001 11:01 AM
This sounds like it would really work and would be a FANTASTIC addtiion and help.

Magicia (Site Manager)
http://uwo.world-gaming.cc
Posted By: caymuc Re: CRON JOB 'faking' HACK - 03/14/2001 12:06 PM
Yes, I think so too. The only mess is that I am not experienced enough to code that, and the Greeks here probably don't need it, because for them chron's probably are not a problem as they run own servers, I'm sure... So, who's doing it :)))

Carl

----------
darkwebforum
Posted By: josetann Re: CRON JOB 'faking' HACK - 03/20/2001 3:09 AM
First, it shouldn't be that hard to setup a cron event. Either do it manually, or ask your host nicely. If they give you a problem adding multiple ones, just have them add one. In that one, you can call any other file/script you want.

Ok. For the rest of ya, why not just run it from the browser once a day? Having the system check if it's been run yet every time a user does something, is gonna bog you down. If you must have it semi-automated, then I'd have it run its query every time an admin/moderator does something. They're always around, but there's a lot less of them than regular users.

Posted By: caymuc Re: CRON JOB 'faking' HACK - 03/27/2001 1:07 AM
my Host would then reply also nicely:
'Buy the large package (install your own server)....'

No, unfortunately cronjobs are not possible here. :)


Carl

----------
darkwebforum

Edited by caymuc on 03/26/01 05:08 PM.

Posted By: caymuc Re: CRON JOB 'faking' HACK - 03/27/2001 1:08 AM
my Host would then reply also nicely: 'Buy the large package (install your own server)....' No, unfortunately cronjobs are not possible here. smile

Carl

----------
darkwebforum
© UBB.Developers