icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.
Old August 15th, 2004, 9:06 PM   #1 (permalink)
Surpass Fan
Comfy Contributor
 
Joined in Apr 2004
Lives in Canada
Hosted on Pipe
141 posts
Gave thanks: 4
Thanked 3 times
Cron Job

Hello,

I would like to know if it is possible to use a cron job to run a php script once a week (Sunday at midnight) or will this be consider as a script running in the background (and be illegal)?

BTW : I know nothing on Cron Job beside they can do something at a definit time! :ktoe:
__________________
Website : max-worlds.net
Shared Server : Pipe
MadMax is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 15th, 2004, 9:16 PM   #2 (permalink)
minor deity
Super #1
 
Bigjohn's Avatar
 
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,395 posts
Gave thanks: 28
Thanked 94 times
Depends on what the cron job does.

For example, if you look in the EMAIL forum you'll see a post from me on how to automate Spam Assassin 'learning'. That runs as a cron job.

Other people run 'backup' jobs.

So, unless the script you're running uses a TON of resources and never exits, I think you're ok.

John
__________________
Proud to be a Surmunity Mod!
XEON PASS60 PASS61
Make a fundamental difference!
My Sites:
Curious about Brewing Beer? Join the community!
>>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax
Get into an Art museum
Victorian London
It's your brain -ON WEB - mybrainhost.com (under development)
What SHOULD Government do? Much Less than it Does!
Bigjohn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 15th, 2004, 9:17 PM   #3 (permalink)
Surpass Fan
Comfy Contributor
 
Joined in Apr 2004
Lives in Canada
Hosted on Pipe
141 posts
Gave thanks: 4
Thanked 3 times
The script will only update a couple of tables.
__________________
Website : max-worlds.net
Shared Server : Pipe
MadMax is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 15th, 2004, 9:30 PM   #4 (permalink)
Surpass Fan
Comfy Contributor
 
kall's Avatar
 
Joined in May 2004
Lives in Auckland, New Zealand
Hosted on Sync
166 posts
Gave thanks: 0
Thanked 0 times
Where does it say that a script running in the background is illegal?

Even surmunity has cron scripts that run at times throughout the day (updating user ranks based on post count/sending daily Forum updates/sending reminder notices to people who haven't confirmed their email address...)

It would be impossible (or at least very annoying and time-consuming) to run any kind of dynamic site without beinag allowed to have scripts that are executed in the background.
__________________
From NZ? Want Free Messageboards and Games? - NZB

From NZ? Want Kiwi Web Hosting and Design? - Sparkle Hosting

Sync sync sync...sync sync sync..sync your bootie!
kall is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 15th, 2004, 9:41 PM   #5 (permalink)
Surpass Fan
On a golden path...
 
Joined in Nov 2003
432 posts
Gave thanks: 0
Thanked 0 times
To run a PHP script as a CRON put this in the execution field and set your times.

GET http://yourdomain.tld/directory/script.php
fwwebs5 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 15th, 2004, 9:50 PM   #6 (permalink)
Surpass Fan
Comfy Contributor
 
Joined in Apr 2004
Lives in Canada
Hosted on Pipe
141 posts
Gave thanks: 4
Thanked 3 times
Sorry for the confusion, when I put "and be Illegal", I just wanted to make sure this wouldn't be Illegal. I guess I could have put "or be Illegal" instead of that script running in the background stuff.

Sorry, I hope you aren't to mad!
__________________
Website : max-worlds.net
Shared Server : Pipe
MadMax is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 15th, 2004, 9:53 PM   #7 (permalink)
Surpass Fan
Comfy Contributor
 
Joined in Apr 2004
Lives in Canada
Hosted on Pipe
141 posts
Gave thanks: 4
Thanked 3 times
Quote:
Originally Posted by fwwebs5
To run a PHP script as a CRON put this in the execution field and set your times.

GET http://yourdomain.tld/directory/script.php
If that script isn't in the Public_Html forlder, should I put the IP/~username/ intead of my domain? I really don't want any browser to view that file easily.
__________________
Website : max-worlds.net
Shared Server : Pipe
MadMax is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 15th, 2004, 10:13 PM   #8 (permalink)
Surpass Fan
Comfy Contributor
 
kall's Avatar
 
Joined in May 2004
Lives in Auckland, New Zealand
Hosted on Sync
166 posts
Gave thanks: 0
Thanked 0 times
Quote:
Originally Posted by MadMax
Sorry for the confusion, when I put "and be Illegal", I just wanted to make sure this wouldn't be Illegal. I guess I could have put "or be Illegal" instead of that script running in the background stuff.

Sorry, I hope you aren't to mad!
I think the issue is more on what the script does, rather than when or how it is called.
__________________
From NZ? Want Free Messageboards and Games? - NZB

From NZ? Want Kiwi Web Hosting and Design? - Sparkle Hosting

Sync sync sync...sync sync sync..sync your bootie!
kall is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 15th, 2004, 10:24 PM   #9 (permalink)
Surpass Fan
Comfy Contributor
 
Joined in Apr 2004
Lives in Canada
Hosted on Pipe
141 posts
Gave thanks: 4
Thanked 3 times
Quote:
Originally Posted by kall
I think the issue is more on what the script does, rather than when or how it is called.
Yeah you are right but I am sure my script isn't a big deal for the Server.
__________________
Website : max-worlds.net
Shared Server : Pipe
MadMax is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On