Forum Moderators: coopster & phranque

Message Too Old, No Replies

scheduling Perl scripts on a shared hosting environment

         

sdani

11:28 pm on Jul 30, 2006 (gmt 0)

10+ Year Member



I am planning to write a Perl app for shared hosting environment. Ideally this application should run in the background every X minutes. (for both Windows and Unix shared hosting).

Typical low cost shared hosting providers do not provide cron access, and the few Windows web hosting providers I have researched, do not provide task scheduling.

How is scheduling of Perl scripts handled in this type of restrictive environments?

I am thinking of calling my script from a web page and then my clients (who will use this script) can call that web page every X minutes using some service, which checks to see if the site is up or not. This solution seems ugly. Any alternatives?

Thanks
sdani

crevier

9:34 pm on Aug 2, 2006 (gmt 0)

10+ Year Member



First, my web account is on a shared box which has cron access. In a Linux environment, each user has their own cron. If your web host has turned this off, it's perhaps because they don't know how to administer it or keep it safe (so that one cron job doesn't bring down the whole system). It's just easier to not allow it. So, you may want to look around a bit more, such providers exist.

Second, your idea of having the script run as a CGI and just visit the URL on a scheduled basis can work too. I've done that before. You can just use Windows Task Scheduler to visit the URL daily or whatever. It works well. Not quite as reliable as cron, but it works.

fabricator

3:28 pm on Aug 16, 2006 (gmt 0)

10+ Year Member



My own shared host, uses cpanel to provide access to Cron jobs.

It says to enter commands in this form.
GET [yourdomain.com...] > /dev/null

That command would be linux specific but obvious some way to do the same in a windows enviroment.

evaddnomaid

9:10 am on Aug 21, 2006 (gmt 0)

10+ Year Member



Do you have _any_ Linux machines where you have the ability to use cron? If so, and if you also have access to a utility like cURL or wget, you can create a cron job to access a Perl script as a Web page on a regular basis.