Scheduled Tasks

Discussion in 'Suggestions and Feedback' started by Watson, Apr 13, 2004.

  1. Watson

    Watson Guppy

    I have some other websites hosted on DiscountASP.net and they've just started offering a great feature called "scheduled tasks". It's free.

    They basically allow one task per customer. You enter a URL of a page on your website and they'll hit it at set intervals for you. The minimum time between hits is 15 mins.

    An example of how I use this:
    I send an email to all new users of my website. I've found in the past that the email server has been unreliable. When it's down, my users get an error upon joining my site, or I catch the error, skip over it and they don't get an email at all. So now I just insert the emails into a database table. Then I have an ASP script that processes the emails (if it can). I use the scheduled task to hit this script every 15 mins. So my users get their emails within 15 mins. But if the email server is down, they're sent out whenever it comes back up.

    There are many more uses for this. I'm sure other people would love to have a script run every X minutes (or hours) to process some data.

    Any chance of Jodo implementing a similar service? I assume you'd just need a PC left on that can run through the URLs set up as the scheduled tasks.

    Watson.
  2. WebDeveloper

    WebDeveloper Perch

    Great idea, I'd definitely use this!
  3. hatton

    hatton Perch

    Actually Jodohost already has the ability to run "Scheduled Tasks" using their ColdFusion servers. I have inquired to this in the past and the reply that I got was a conditional yes - depending on the complexity of the page being called and the schedule requested.

    In all honesty I can't blame them for not promoting this service. It's something that *can* be done, however you have to figure the impact of *what* is being done, especially in a shared environment.

    As far as offering a template-based tool to create the requests, I for one would prefer to have a human hand involved in the process - especially given the nature of Jodo's services. Not everyone writes clean code, and all it would take is a handfull of bad pages scheduled to run every 15 minutes to cause a catastrophic failure on the servers. Remember, it isn't just the machine MAKING the request that is involved, but also the machine PROCESSING it.
  4. Yash

    Yash Bass

    OK, this is a good idea

    We'll consider writing a program that would allow us to set this up for customers
  5. roaddc

    roaddc Guppy

    Any updates on this?
  6. WebDeveloper

    WebDeveloper Perch

    Any updates? What are others using to schedule scripts to run?
  7. Stephen

    Stephen US Operations Staff Member

    Many use a linux account cronjob to hit a windows server url for the same effect.
  8. bro

    bro Perch

    I use one this way to update an RSS feed every hour.

    For those who haven't used them; there is an option for 'Crontab' in the hsphere linux account CP. This takes you to a screen where you can set up commands to run at particular intervals.
    I use wget here to run an asp page on one of my domains that generates the new feed. Be sure to use the --delete-after option, or you'll end up with thousands of copies of the file in the account (as I found out when it filled up....)

    Unfortunately, I need to use up yet another of my hsphere user accounts just for this one command, as all my domains require Windows accounts.
  9. skypanther

    skypanther Exalted Code Master!

    I have a Windows development server at my office that's always on. I set up Windows Scheduler tasks on it to run my database backup scripts. I assume there's a way to get it to call a web page periodically, though I haven't looked into it.

    If you're running PHP, you could use pseudo-cron. Basically, it's a script you embed on a regularly requested page. The script's purpose is to call other scripts that you've scheduled.

    http://www.bitfolge.de/pseudocron-en.html

    I'll bet there are similar solutions for ASP, CF, etc.

    Tim
  10. bro

    bro Perch

    duh, never occured to me. My PCs are all 24x7 as a matter of course. You can set up Task Scheduler to start a browser on a particular page and run a script. It doesn't seem to work with IE, for some reason, but I was able to get it to start Firefox every 10 minutes (Command is "c:\...\firefox.exe http://www.yourDomain.com/yourScript.asp"), and close it again after a minute. Using 'Wget for Windows' or something similar instead of a browser would probably be a neater way to do it.

    Having it set up this way would allow greater flexibility than using Cronjobs, but does mean you need an always-on PC.

Share This Page

JodoHost - 26,000 hosting end-users in 100 countries
Plesk Web Hosting
VPS Hosting
H-Sphere Web Hosting
Other Services