Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Problem, please help. Details »»
Problem, please help.
Version: , by AnkisethGallant AnkisethGallant is offline
Developer Last Online: Jun 2007 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 05-25-2002 Last Update: Never Installs: 0
 
No support by the author.

I'm making a script, and I want something to happen automatically after a certain time. How do I do this? For example, say I want a bank to calculate interest every 24 hours, regardless if the person visits the bank or not. Any ideas?

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 05-25-2002, 09:11 PM
sifuhall sifuhall is offline
 
Join Date: Nov 2001
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you're on a Unix box, crontab is a good option
Reply With Quote
  #3  
Old 05-25-2002, 09:23 PM
Steve Machol's Avatar
Steve Machol Steve Machol is offline
 
Join Date: Nov 2001
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As sifuhall said, use 'crontab' for Unix/Liniux servers or Widnows Scheduler for Windows servers.
Reply With Quote
  #4  
Old 05-25-2002, 09:48 PM
AnkisethGallant's Avatar
AnkisethGallant AnkisethGallant is offline
 
Join Date: Oct 2001
Location: Las Vegas
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sounds good, but you'll probably need to be more specific than that, I don't know what either of those are.
Reply With Quote
  #5  
Old 05-25-2002, 09:54 PM
AnkisethGallant's Avatar
AnkisethGallant AnkisethGallant is offline
 
Join Date: Oct 2001
Location: Las Vegas
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've looked at crontab, and it sounds easy enough. Does it automatically just run the file you point it to. So, if I made a interest.php file, would it automatically run that file every 24 hours?
Reply With Quote
  #6  
Old 05-25-2002, 10:00 PM
sifuhall sifuhall is offline
 
Join Date: Nov 2001
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's a little more detailed than that. You specify when the file is to run, then what file or command is to execute.

Here's an overview.

http://hoth.stsci.edu/man/man1/crontab.html
Reply With Quote
  #7  
Old 05-25-2002, 10:02 PM
Steve Machol's Avatar
Steve Machol Steve Machol is offline
 
Join Date: Nov 2001
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

http://www.superscripts.com/tutorial/crontab.html
http://www.usats.com/learn/crontab.shtml
http://www.aota.net/Script_Installat.../cronhelp.php4
Reply With Quote
  #8  
Old 05-25-2002, 10:08 PM
AnkisethGallant's Avatar
AnkisethGallant AnkisethGallant is offline
 
Join Date: Oct 2001
Location: Las Vegas
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So:
0 0 * * * /directory/interest.php

That's what I would need in the crontab file?
I think I've got it. Any ideas on how to connect to telnet? If you don't know, I'll just ask the guy in charge of the server.
Reply With Quote
  #9  
Old 05-25-2002, 10:15 PM
sifuhall sifuhall is offline
 
Join Date: Nov 2001
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My personal preference is to use lynx -dump to execute php scripts, but again that is my personal preference.

For example:

0 0 * * * lynx -dump http://www.yoursite.com/interest.php

(the dump tag just helps a little to keep the responses to crontab down)


As far as telneting to your server, yeah, I do suggest you contact the person in charge of the server.
Reply With Quote
  #10  
Old 05-25-2002, 10:22 PM
AnkisethGallant's Avatar
AnkisethGallant AnkisethGallant is offline
 
Join Date: Oct 2001
Location: Las Vegas
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

alright, I'll do that.

Thanks a lot for the help.
Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:51 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04352 seconds
  • Memory Usage 2,284KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete