vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Problem, please help. (https://vborg.vbsupport.ru/showthread.php?t=39051)

AnkisethGallant 05-25-2002 09:10 PM

Problem, please help.
 
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?

sifuhall 05-25-2002 09:11 PM

If you're on a Unix box, crontab is a good option

Steve Machol 05-25-2002 09:23 PM

As sifuhall said, use 'crontab' for Unix/Liniux servers or Widnows Scheduler for Windows servers.

AnkisethGallant 05-25-2002 09:48 PM

Sounds good, but you'll probably need to be more specific than that, I don't know what either of those are.

AnkisethGallant 05-25-2002 09:54 PM

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?

sifuhall 05-25-2002 10:00 PM

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

Steve Machol 05-25-2002 10:02 PM

http://www.superscripts.com/tutorial/crontab.html
http://www.usats.com/learn/crontab.shtml
http://www.aota.net/Script_Installat.../cronhelp.php4

AnkisethGallant 05-25-2002 10:08 PM

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.

sifuhall 05-25-2002 10:15 PM

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.

AnkisethGallant 05-25-2002 10:22 PM

alright, I'll do that.

Thanks a lot for the help.


All times are GMT. The time now is 01:36 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01008 seconds
  • Memory Usage 1,724KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete