![]() |
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?
|
If you're on a Unix box, crontab is a good option
|
As sifuhall said, use 'crontab' for Unix/Liniux servers or Widnows Scheduler for Windows servers.
|
Sounds good, but you'll probably need to be more specific than that, I don't know what either of those are.
|
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?
|
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 |
|
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. |
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. |
alright, I'll do that.
Thanks a lot for the help. |
All times are GMT. The time now is 12:32 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|