Jump to content

Anyway to do scheduled tasks with a webhost that doesn't provide cronjobs?

- - - - -

  • Please log in to reply
2 replies to this topic

#1
stilllearningphp

stilllearningphp

    Newbie

  • Members
  • Pip
  • 1 posts
Hey Guys,

Just wondering if anybody has any feedback regarding Scheduled Tasks as I want to setup a script that is executed every morning at a specific time and my web host doesn't offer cronjobs.

I was wondering if there was anyway to configure a script to do this otherwise.

I found an application called phpjobscheduler that I could download and install to my server, and it works as an alternative for cronjobs, but didn't work for me(apparently because I have to insert some type of sketchy coding to my webpages and it will only work if I get hits regularly to them).

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
  • Location:Vancouver, Eh! Cleverness: 200
There is no reliable way to do this, you can have a script infinitely loop (sleep()ing for a minute at a time and if it reaches the date, execute the job) but this will permanently use one Apache child which is what your web host may be limited to. I would use some form of automation on your computer, to access yoursite.com/dojob.php with some sort of authentication, if your computer is on those times. Maybe there is a service out there that will spider a page every day and do this for you.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#
otherwise, there are sites on the net like FREE Cron Jobs - Reliable Web Cron service - Set Cron Job PHP that calls a page on your site on a choosen time... I googled on "web cron" and got a few hits. this is the first match, I don't know anything about that site. there are others out there as well.
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users