UBB.Dev
Posted By: smilesforu Cron Jobs - 02/24/2003 1:19 PM
Ok need some help catching a clue... again. Looking to do cron jobs.. I have telnet acess. No idea how to set this up or how to use it. I know I want to run some cron scripts so I can update information on a regular basis by excuting the scripts.
Thanks a bunch in advance...
Posted By: JoshPet Re: Cron Jobs - 02/24/2003 5:07 PM
This might help you get started.
Posted By: smilesforu Re: Cron Jobs - 02/25/2003 3:00 AM
Ok that got me to the variables... I can't run cgi-bin or perl from outside the cgi-bin directory. Do I need to move or setup a folder/file inside the cgi-bin to run this?

# Url to the cgi-bin containing the UBB.threads php package
$config{'cgiurl'} = (I set this to my php folder in the threads install)

My php doesn't need to be inside the cgi-bin

MY host wants 24.95 for each cron setup..yikes. so am looking at a remote cron service. (9.95/yr)
http://www.fastcron.com/ Anybody use them...?

Can I setup the subscriptions using a outside service? If so which file should I call to make it generate run. subscription.php?

Kinda shakey on this but getting closer..
Posted By: JoshPet Re: Cron Jobs - 02/25/2003 5:30 AM
If you can run php that seems easier. All you need to do is edit the path to main at the top of subscriptions.php and doexpire.php

Then call them. Ther Perl versions require you to set a bunch of variables.... but the PHP versions will use the existing threads variables.
Posted By: smilesforu Re: Cron Jobs - 02/25/2003 5:48 AM
Thanks that worked for subscriptions. I think I will manually doexpire stuff myself if things get to full.
Posted By: JoshPet Re: Cron Jobs - 02/25/2003 6:02 AM
If you want to save the money.... you can run them yourself daily in your browser.

If everything works and there are no errors.... the correct result would be a blank page.

You'd load your browser like this:
http://www.yourforum.com/ubbthreads/cron/php/subscriptions.php

But you'd have to remember to run subscriptions daily.

Do expire could be run every so often.. as it would be no big deal to have posts being expired a little late.
Posted By: smilesforu Re: Cron Jobs - 02/25/2003 6:03 AM
Oh wait you got that neat mod for stubs... betters set that one up too.
Posted By: jonlevine Re: Cron Jobs - 03/03/2003 3:41 AM
I ran into a similar situation and this is what I did.

I set up a Scheduled Task in Windows to open a web page that I built and keep on my home computer. All that web page contains is a java redirect to my subscriptions.php.
I set the task to run every night at midnight, all I have to do is make sure my computer is on.

Here's the redirect code in case you need it:

<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
redirTime = "50";
redirURL = "http://www.yoursite.com/cron/php/subscriptions.php";
function redirTimer() { self.setTimeout("self.location.href = redirURL;",redirTime); }
// End -->
</script>
</head>


<BODY onLoad="redirTimer()">
</body>
</html>
© UBB.Developers