Jump to content


Photo
- - - - -

Run program on server continuosly.


  • Please log in to reply
4 replies to this topic

#1 SpeedCrazy

SpeedCrazy

    Life is one heck of a ride, so hang on tight!

  • Folding Member
  • 3817 posts
  • Gender:Male
  • Location:Between birth and death.

Posted 27 October 2011 - 04:33 PM

I am totally ignorant on this side of the web.
What i want to know is how, if it is possible at all, i would go about writing a script to execute a predefined command on data in a db at a time specified in the db.
My idea was a email reminder program, i enter a reminder note and the time i want the reminder sent and at the appropriate time the note is sent.
Problem is i am clueless as to how i would get a script to run continuously on the server, and what language it would need to be in.
Anybody have any tips?
Thanks,
Speed
Fold for Team OCC


i7 930 @ 3.9 || Dual-SLI GTX 250 || ASUS P6X58D-E || 3x2GB G.Skill Pi @ 1600 || Corsair TX850w || 2x WD Caviar Black 500gb


#2 rmb938

rmb938

    Member

  • Members
  • PipPip
  • 374 posts
  • Gender:Male
  • Location:USA New York

Posted 27 October 2011 - 04:58 PM

If its linux you can just make a shell script and put it on a cronjob. Not to sure about windows servers though.

Asus M4N82 Deluxe | AMD Phenom II x4 995 3.2Ghz | Xigmatech Dark Knight 2100 RPM
Mushkin Castillo Deluxe 40GB(Windows 7) | WD Caviar Green 1TB Sata |
24x Asus DVD Burner Sata
2X EVGA SuperCLocked GTX 460 1GB | Antec 1200 |XFX 750W
karyan.png


#3 SpeedCrazy

SpeedCrazy

    Life is one heck of a ride, so hang on tight!

  • Folding Member
  • 3817 posts
  • Gender:Male
  • Location:Between birth and death.

Posted 27 October 2011 - 05:05 PM

I looked at crontab but i am thinking a php daemon may be better. Especially as i know php.
Just found out about php daemons so i don't know enough to decide yet.
Fold for Team OCC


i7 930 @ 3.9 || Dual-SLI GTX 250 || ASUS P6X58D-E || 3x2GB G.Skill Pi @ 1600 || Corsair TX850w || 2x WD Caviar Black 500gb


#4 KissMyWookie

KissMyWookie

    Member

  • Members
  • PipPip
  • 58 posts
  • Gender:Male
  • Location:Spring, TX

Posted 21 January 2012 - 06:16 PM

You better check with your hosting co. first, as some don't like this type of useage, while others are fine if you make a request first.

#5 flareback

flareback

    justified through faith

  • Members
  • PipPipPipPip
  • 1759 posts
  • Gender:Male
  • Location:SC, USA

Posted 21 January 2012 - 07:48 PM

If its linux you can just make a shell script and put it on a cronjob. Not to sure about windows servers though.

:withstupid: Cron is the way to go here.
Primary Rig - Intel core i7 920 | Gigabyte EX58 UD4P | 6 GB DDR3 1333 | Sapphire Radeon HD 4850
Secondary Rig - 20 inch iMac | 2.4 Ghz Intel Core 2 Duo | 2 GB DDR2 RAM
Mobile Rig - Asus Eee pc 1000 - 1.6Ghz intel atom | 40Gig SSD | Ubuntu Netbook Remix