Comment On The Batch Process Manager

Ahhh, e-cards. Once a fun way to express those delicate emotions in a way that only hundreds of retina-burning animated GIFs and a midi version of Rush's "Tom Sawyer" can. Now, a surefire way to get your email added to spammers' mailing lists. Still, it's hard not to smile when you get an e-card. [expand full text]
« PrevPage 1 | Page 2Next »

Re: The Batch Process Manager

2007-06-27 13:06 • by pitchingchris
Think of all the time he'll never get back because he has to go send all the jobs manually.... Not to mention it sent everything down to one point of failure, so if Frank goes into a coma for awhile, we just can't get cards then. You'll get him once he comes out of it.

Re: The Batch Process Manager

2007-06-27 13:10 • by Rob (unregistered)
*twitch*

Re: The Batch Process Manager

2007-06-27 13:11 • by SomeCoder (unregistered)
*jaw drops*

That's.... awful. Though honestly, I've had a few "automated" processes that required me to click a button once a day. The thing is, this process was temporary and going away after a few weeks so I just kept doing it for the few weeks. For anything that is for production, that's unacceptable.

Re: The Batch Process Manager

2007-06-27 13:12 • by Zemyla
"Yes, sir, I have to surf the Internet at least once a day. It's vital to the company's survival."

Damn, that's smooth. I have to try that.

Re: The Batch Process Manager

2007-06-27 13:14 • by Calli Arcale (unregistered)
"Practically every day."

I'm worried.

:p

Seriously, I once wrote a script that I was having a devil of a time getting to work under cron. It was the first scheduled task I'd ever attempted, so it took me a while to discover some of the pitfalls (it runs in sh, and your resource file isn't run by default). In the meantime, I was kicking it off manually from a loaner laptop in the evenings (and praying that my ISP wouldn't revoke my IP address in the middle of it). I eventually added a feature to make it sleep for a specified number of hours so I wouldn't have to stay up until 11, and then eventually I nailed the last stupid bug that was keeping cron from successfully running it. Today it runs automatically.

But at least I knew it was a bad long-term strategy.....

Re: The Batch Process Manager

2007-06-27 13:22 • by Someone (unregistered)
I've seen this sort of thing on websites that are hosted cheaply in a multihosting enivironment, where you have PHP and MySQL, but no cron (or atleast no access to it). What they did was write a short snippet of code vaguely emulating cron's behavior and including it at the bottom of every PHP page of the site.

It actually worked nicely as long as they had traffic. (Although the cronjobs mustn't get too long or it would show up in the page load times or, worse, run into PHP's configured limit for the running time of a script.)

Re: The Batch Process Manager

2007-06-27 13:37 • by akatherder
Hmm, I did this once when I didn't have access to schedule tasks. I think it was a tracking/logging mechanism to take a daily snapshot of some data at a given time.

With the limited access I had, I'm not sure there was a better way. It worked fine for me though.

Re: The Batch Process Manager

2007-06-27 13:45 • by zip
142982 in reply to 142975
Yep, I've been guilty of this kind of thing, for the same reason as other posters have mentioned -- needing scheduled functionality in a php/mysql environment where my host wouldn't let me do anything.

so, just check to see if it's time for your "job" on every page load...

Does anyone know of a better way to do this? I guess a cron job on my local machine invoking a page load once a day would be better, in case I wasn't getting any traffic :)

Re: The Batch Process Manager

2007-06-27 13:46 • by IHaveNoName:-( (unregistered)
142984 in reply to 142970
Someone:
I've seen this sort of thing on websites that are hosted cheaply in a multihosting enivironment, where you have PHP and MySQL, but no cron (or atleast no access to it). What they did was write a short snippet of code vaguely emulating cron's behavior and including it at the bottom of every PHP page of the site.

It actually worked nicely as long as they had traffic. (Although the cronjobs mustn't get too long or it would show up in the page load times or, worse, run into PHP's configured limit for the running time of a script.)

Well, all you've got to do is accessing the web site at specific times. This can be easily done with the windows task manager oder cron. And if you do this you can easily move the cron emulator in its own page and do what Frank did, but make it automatic.

Re: The Batch Process Manager

2007-06-27 13:47 • by RandomVisitor (unregistered)
142985 in reply to 142975
T.I. used to be an intern at an IT-department. Who would've thunk it? Although this might not be the same T.I. in the music business... ?

Re: The Batch Process Manager

2007-06-27 13:52 • by Rank Amateur
"There's a way to schedule tasks?" Frank replied, surprised.

Of course there is a way. Dripping faucet drips into bucket on seesaw. When bucket is heavy enough, seesaw tips lifting lid off cheese plate. Mouse runs out of hole to eat cheese. String tied to mouse tail pulls crank that pushes pencil into CPU power switch. Computer boots and runs browser from Startup menu. When mouse is full, he runs back to his hole, where a piezoelectric switch starts an electric motor that turns a paddle wheel scooping water out of the bucket and onto the floor. Water runs into surge protector, shorting it out and shutting down the computer. Bucket returns it’s original position. Paddle wheel stops when mouse gets hungry (and loses weight). Water dries, leaving power available for the computer.

Really quite elegant.

--Rank

Re: The Batch Process Manager

2007-06-27 13:57 • by Jeff S
142992 in reply to 142984
IHaveNoName:-(:
Someone:
I've seen this sort of thing on websites that are hosted cheaply in a multihosting enivironment, where you have PHP and MySQL, but no cron (or atleast no access to it). What they did was write a short snippet of code vaguely emulating cron's behavior and including it at the bottom of every PHP page of the site.

It actually worked nicely as long as they had traffic. (Although the cronjobs mustn't get too long or it would show up in the page load times or, worse, run into PHP's configured limit for the running time of a script.)

Well, all you've got to do is accessing the web site at specific times. This can be easily done with the windows task manager oder cron. And if you do this you can easily move the cron emulator in its own page and do what Frank did, but make it automatic.


Great WTF article, and even greater WTF comments! A classic all around!

WTF++

Re: The Batch Process Manager

2007-06-27 14:00 • by hex (unregistered)
142996 in reply to 142990
++?????++ Out of Cheese Error. Redo From Start.

Re: The Batch Process Manager

2007-06-27 14:10 • by KattMan
143003 in reply to 142990
Rank Amateur:
"There's a way to schedule tasks?" Frank replied, surprised.

Of course there is a way. Dripping faucet drips into bucket on seesaw. When bucket is heavy enough, seesaw tips lifting lid off cheese plate. Mouse runs out of hole to eat cheese. String tied to mouse tail pulls crank that pushes pencil into CPU power switch. Computer boots and runs browser from Startup menu. When mouse is full, he runs back to his hole, where a piezoelectric switch starts an electric motor that turns a paddle wheel scooping water out of the bucket and onto the floor. Water runs into surge protector, shorting it out and shutting down the computer. Bucket returns it’s original position. Paddle wheel stops when mouse gets hungry (and loses weight). Water dries, leaving power available for the computer.

Really quite elegant.

--Rank


Mr. Goldberg would be proud.

Re: The Batch Process Manager

2007-06-27 14:13 • by geoelectric (unregistered)
143005 in reply to 142996
hex:
++?????++ Out of Cheese Error. Redo From Start.


Pipe down, Wallace, and get me that TPS report.

Re: The Batch Process Manager

2007-06-27 14:22 • by MyWillysWonka
I'm pretty sure I used to work with "Frank"...

Them - "...but we can just run the DB script every morning when we come in. It only needs to be run on weekdays."

Me - restraining 'fist of death©'.

Them - "What's wrong with that vein on your neck, and the other 3 on your forehead?"

Re: The Batch Process Manager

2007-06-27 14:22 • by It's a Feature
143013 in reply to 142957
How simple! On the web server, just put a job in the task scheduler that runs once a day with this in the commandline:

http://localhost/dispatchqueued.asp

And the WTF will live on!

Re: The Batch Process Manager

2007-06-27 14:22 • by Feyr (unregistered)
sounds like the kind of code someone would write here

/goes back to harrassing them about proper external argument validation

Re: The Batch Process Manager

2007-06-27 14:24 • by Chris Harmon (unregistered)
Wow - I remember seeing that being done! It was 7 years ago, but *still*. The guy didn't know about Scheduled Tasks and running VBS scripts, but knew how to write an ASP webpage and would just open the webpage when needed. I think he later figured out a way to open webpages via scheduled task too :)

Re: The Batch Process Manager

2007-06-27 14:45 • by Spastic Weasel (unregistered)
143023 in reply to 142996
Ponder Stibbins FTW

Re: The Batch Process Manager

2007-06-27 14:46 • by Spastic Weasel (unregistered)
143024 in reply to 142996
Ponder Stibbons FTW

Re: The Batch Process Manager

2007-06-27 14:48 • by db2
He he. Reminds me of the (optional, thankfully) manual queue processing mode that's in phplist. I think it uses a meta refresh or some such to handle the repeating interval so you can use the thing in a reasonable fashion on a host without cron access.

Re: The Batch Process Manager

2007-06-27 15:07 • by Anon (unregistered)
143028 in reply to 143013
It's a Feature:
How simple! On the web server, just put a job in the task scheduler that runs once a day with this in the commandline:

http://localhost/dispatchqueued.asp

And the WTF will live on!

Don't laugh. That's how Drupal, a popular open source CMS, works.

(It's even the CMS that Tim Berners-Lee uses for his blog. Yes, that Tim Berners-Lee.)

Re: The Batch Process Manager

2007-06-27 15:12 • by foo (unregistered)
143032 in reply to 142975
akatherder:
Hmm, I did this once when I didn't have access to schedule tasks. I think it was a tracking/logging mechanism to take a daily snapshot of some data at a given time.

With the limited access I had, I'm not sure there was a better way. It worked fine for me though.


Right up until the next time you need an "automated" script to run daily. I am picturing this consultant after a few years starting up Firefox with 100 tabs to fire off different "daily" processes.

Re: The Batch Process Manager

2007-06-27 15:23 • by ex-amatuer (unregistered)
I will admit like the rest of you to doing this as well.

It was one of my first jobs, about a year after college (tells you a bit about the job market back then - circa 2000), where a guy asked to have a shopping cart site built, and I said "Sure, I can do that".

This was with asp and an access database. So one of the requirements was to send an email in the morning of all of the previous outstanding orders. I had no clue how to schedule anything, so luckily they had a techie there who scheduled the page to be open daily.

Thank God those days are long behind me - now I'll just simple schedule Terminal Services to my prod server, which would have IE set as the deault application to run on log in, which in turn would have this set as my home page.
(I know not quite as creative as Rue up above)

Re: The Batch Process Manager

2007-06-27 15:38 • by Random832
143044 in reply to 142970
Someone:
I've seen this sort of thing on websites that are hosted cheaply in a multihosting enivironment, where you have PHP and MySQL, but no cron (or atleast no access to it). What they did was write a short snippet of code vaguely emulating cron's behavior and including it at the bottom of every PHP page of the site.

It actually worked nicely as long as they had traffic. (Although the cronjobs mustn't get too long or it would show up in the page load times or, worse, run into PHP's configured limit for the running time of a script.)


Wikipedia does this. http://en.wikipedia.org/wiki/Help:Job_queue.

Re: The Batch Process Manager

2007-06-27 15:58 • by KattMan
143050 in reply to 143044
Random832:


Don't you love how the documentation for the application is contained within the application itself?

User: "How do I use wiki?"
wikiDev: "Use wiki to look that info up."

Re: The Batch Process Manager

2007-06-27 16:24 • by bstorer
I've seen this done using Active Desktop with daily synchronization instead of a browser, which I suppose kind of automates things.

Re: The Batch Process Manager

2007-06-27 16:46 • by Luciana (unregistered)
I can't believe it, he did all that manually?!

Re: The Batch Process Manager

2007-06-27 16:58 • by Random832
143073 in reply to 143050
It's not as if actually navigating the help system is any more complicated than reading any other webpage. The documentation is for when you need to know something specific to it, like, how to edit a page, or what people are talking about when they say "the job queue ..." or something.

Re: The Batch Process Manager

2007-06-27 17:01 • by elan (unregistered)
I remember working at a certain company where a credit card collection process runs in a asp page that refreshes itself. The ops people have to make sure there is a copy of IE running that page on a certain server all the time...

Re: The Batch Process Manager

2007-06-27 17:12 • by An Unhandled Exception Was Thrown (unregistered)
That's the best: put a javascript timeout in the page so it reloads by itself, then just let IE automagically keep things afloat.

Or maybe not. Or more likely just to be funny and torment someone else. I know, use that method ONLY for clients you hate.

BTW, my company's intranet runs on ColdFusion 4.5, where the scheduler -- you guessed it -- calls pages to execute any scheduled ColdFusion task.

Re: The Batch Process Manager

2007-06-27 17:22 • by Andrew (unregistered)
143083 in reply to 142982
zip:
Yep, I've been guilty of this kind of thing, for the same reason as other posters have mentioned -- needing scheduled functionality in a php/mysql environment where my host wouldn't let me do anything.

so, just check to see if it's time for your "job" on every page load...

Does anyone know of a better way to do this? I guess a cron job on my local machine invoking a page load once a day would be better, in case I wasn't getting any traffic :)


I can think of a few ways to make CRON events when the ISP restricts CRON. You have access to PHP, CGI, and the SQL database.

Use CGI to spawn your own cron-daemon, that reads a flat-file list of scripts. This is easy to do using Perl fork/exec. I don't know to make PHP spawn a child process.

Some SQL databases have built-in jobs-handlers. For example, Oracle has DBMS_JOB. I'm not sure what MySQL offers.

Re: The Batch Process Manager

2007-06-27 17:37 • by Stavron (unregistered)
143087 in reply to 143083
Andrew:
I don't know to make PHP spawn a child process.

Try http://php.net/pcntl_fork
:)

Re: The Batch Process Manager

2007-06-27 17:39 • by phaedrus
143088 in reply to 143083
Andrew:
Use CGI to spawn your own cron-daemon, that reads a flat-file list of scripts. This is easy to do using Perl fork/exec. I don't know to make PHP spawn a child process.


pcntl_fork()/pcntl_exec() are how PHP exposes those system calls. Took a quick search for 'fork' on the online PHP manual.

Re: The Batch Process Manager

2007-06-27 17:44 • by The Intern (unregistered)
Original submitter here. I should also mention that simple config changes by the user required tree round-trips to the server to validate. Fun times, fun times.

PS- Hi Ronnie :)

Re: The Batch Process Manager

2007-06-27 17:45 • by The Intern (unregistered)
143091 in reply to 143089
The Intern:
Original submitter here. I should also mention that simple config changes by the user required tree round-trips to the server to validate. Fun times, fun times.

PS- Hi Ronnie :)

tree = "three"

Re: The Batch Process Manager

2007-06-27 17:58 • by madjo
that's no WTF! That's brillant! :)

Re: The Batch Process Manager

2007-06-27 19:26 • by Fry-kun (unregistered)
WTF Workaround:
If you don't have access to cron, just curl the main page every so often, using another computer's cron.

:D

Re: The Batch Process Manager

2007-06-27 20:53 • by Pat (unregistered)
143128 in reply to 142990
Rank Amateur:
"There's a way to schedule tasks?" Frank replied, surprised.

Of course there is a way. Dripping faucet drips into bucket on seesaw. When bucket is heavy enough, seesaw tips lifting lid off cheese plate. Mouse runs out of hole to eat cheese. String tied to mouse tail pulls crank that pushes pencil into CPU power switch. Computer boots and runs browser from Startup menu. When mouse is full, he runs back to his hole, where a piezoelectric switch starts an electric motor that turns a paddle wheel scooping water out of the bucket and onto the floor. Water runs into surge protector, shorting it out and shutting down the computer. Bucket returns it’s original position. Paddle wheel stops when mouse gets hungry (and loses weight). Water dries, leaving power available for the computer.

Really quite elegant.

--Rank


I seem to recall an episode of the Simpsons where Homer left a drinking bird continually pressing the 'Y' key on his computer. Now that's truly a robust solution.

Re: The Batch Process Manager

2007-06-27 22:14 • by Durak (unregistered)
Hmm, I kinda doubt the original story that the guy didn't know you could automate the process. I the reality was the he was strapped for time and probably couldn't devote the necessary it required to write the code, debug it, and then maintain. It was just easier for him to press buttons at night before he went to bed.

Re: The Batch Process Manager

2007-06-27 22:32 • by gwenhwyfaer
143138 in reply to 143028
Anon:
It's a Feature:
On the web server, just put a job in the task scheduler that runs once a day with this in the commandline:

http://localhost/dispatchqueued.asp

Don't laugh. That's how Drupal, a popular open source CMS, works.

(It's even the CMS that Tim Berners-Lee uses for his blog. Yes, that Tim Berners-Lee.)

When you invented the hammer, everything looks like a nail...?

Re: The Batch Process Manager

2007-06-27 22:42 • by SeekerDarksteel
Back when I was a co-op, we had a database server that would have connections time out. But the catch was it would only do it once, then work fine, and only if the server hadn't seen any action for awhile. At the same time I happened to be writing a webpage that would ping all our servers as well as pull data off of environmental monitoring units so we could check our network status easily. And it just so happened that that pinging would be enough to keep the database server from doing it's timeout thing.

So a quick add of a meta refresh tag, along with using active desktop to make my background that webpage, and we no longer had timeout issues.

It also led to something far more wtf-y. I was always the first to know when a server was down. So I'd stop by my boss's office to let him know to which he'd reply "Has anyone called about it? No? Then it's not really down."

Re: The Batch Process Manager

2007-06-27 23:45 • by fennec
143144 in reply to 143083
Andrew:

Use CGI to spawn your own cron-daemon, that reads a flat-file list of scripts.

Spiffy, unless your web host automatically kills processes that have been running a certain amount of time (think DreamHost - though they do have cron).

Re: The Batch Process Manager

2007-06-28 00:16 • by Samn (unregistered)
Free webcron - http://www.webcron.org/

Re: The Batch Process Manager

2007-06-28 00:44 • by pfarrell (unregistered)
143152 in reply to 142965
(and praying that my ISP wouldn't revoke my IP address in the middle of it)


Dude... man nohup

Re: The Batch Process Manager

2007-06-28 03:57 • by Chi (unregistered)
143164 in reply to 142990
That one made my day -- thank you! :-D

Re: The Batch Process Manager

2007-06-28 04:45 • by Kiss me I'm Polish
143170 in reply to 143152
pfarrell:
(and praying that my ISP wouldn't revoke my IP address in the middle of it)


Dude... man nohup
Dude... no quack either.

Re: The Batch Process Manager

2007-06-28 05:34 • by Kain0_0
143172 in reply to 142996
hex:
++?????++ Out of Cheese Error. Redo From Start.


This might cause a round world error...

Anyone know where we can find room 2B?

Re: The Batch Process Manager

2007-06-28 05:46 • by Sid2K7 (unregistered)
143173 in reply to 143172
Kain0_0:
hex:
++?????++ Out of Cheese Error. Redo From Start.


This might cause a round world error...

Anyone know where we can find room 2B?



Of course. Its shown on the map. Maps are available in Room 2A and only require filling out form A-38.
« PrevPage 1 | Page 2Next »

Add Comment