The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 18, 2019, 07:52:56 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: So say you wanted to...  (Read 3553 times)
vsloathe
vim ftw!
Global Moderator
Lifer
*****
Offline Offline

Posts: 1669



View Profile
« on: April 14, 2008, 12:31:46 PM »

Create a system whereby you (or several users!) had a control panel app, and this control panel let you add scheduled jobs. Say you could log in and say "do this task every 2 hours, and email me the results". How would you go about it?
Logged

hai
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #1 on: April 14, 2008, 12:52:49 PM »

I'd write an itsy cron job that checked a DB for jobs once a minute.

It can go from very GUI to very codish... if I was doing it for *me* then I'd prolly just have a text blob with some code that was executed, or perhaps the name of a PHP file that I wanted run.

Schedulewise, I'd probably mimic cron, or close to it with a couple notable exceptions, like run every 17 minutes and such, or run based on state change of a particular resource ( a semaphore file is dropped, a new file exists, a field in a table has changed etc etc).

With this sort of mechanism you'd avoid all the permission issues you'll run into if you try to modify crontabs on the fly via PHP.

Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
nop_90
Global Moderator
Lifer
*****
Offline Offline

Posts: 2203


View Profile
« Reply #2 on: April 14, 2008, 02:00:03 PM »

make a demon process
have demon process only allow communication with rpc calls
then make gui (does not matter if on server side or client side) that talks to it over the rpc.

Logged
dink
Expert
****
Offline Offline

Posts: 349


View Profile
« Reply #3 on: April 14, 2008, 06:03:17 PM »

Quote
How would you go about it?

Fire up skype and dial up Bombay?
Logged

[quote Nutballs]
the universe has a giant fist, and its got enough whoop ass for everyone.
[/quote]
vsloathe
vim ftw!
Global Moderator
Lifer
*****
Offline Offline

Posts: 1669



View Profile
« Reply #4 on: April 14, 2008, 07:09:43 PM »

ty ty perk for idea.
Logged

hai
jammaster82
Lifer
*****
Offline Offline

Posts: 666


Thats craigs list for ya


View Profile
« Reply #5 on: April 16, 2008, 06:57:23 PM »

Create a system whereby you (or several users!) had a control panel app, and this control panel let you add scheduled jobs. Say you could log in and say "do this task every 2 hours, and email me the results". How would you go about it?

sounds like rb4 to me... Wink
HOw about storing actual php code in the database
fields and then executing it with the following:

http://www.php.net/eval

? just throwing out ideas, still havent the first clue of php...
programs writing programs always gave me a wank.gif

« Last Edit: April 17, 2008, 05:44:57 AM by jammaster82 » Logged

The watched pot, never boils... But if you walk away from it , the soup burns.  What gives?
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!