Welcome to WebmasterWorld Guest from 34.201.121.213

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

scheduling Perl scripts on a shared hosting environment

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

Preferred Member

10+ Year Member

joined:Aug 20, 2003
posts:451
votes: 0


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

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

Junior Member

10+ Year Member

joined:Sept 19, 2005
posts:44
votes: 0


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.

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

Junior Member

10+ Year Member

joined:Apr 2, 2005
posts:70
votes: 0


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.

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

New User

10+ Year Member

joined:Apr 21, 2006
posts:30
votes: 0


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.