Jump to content

How to set up a nightly batch process?


loamguy

Recommended Posts

Hi all,

 

Newb here with a few months of PHP experience.

 

I'm working on a project where if a web user signs up for a 30-day trial, they need to be notified near the end of that trial--let's say 25 days--that the trial is expiring. So I need some kind of batch process that runs in the background, perhaps every night at 1am, that looks at the signup date for all trial users and compares that date to the current date. If the difference is 5 days, then that user should be sent an email.

 

Does anyone know how to set up a nightly batch process that like this? I'm not concerned so much with the date comparison as I am with getting a daily process to run in the background. Coldfusion has something called a Scheduled Task, but being new to PHP, I don't know what would be comparable.

 

Any help welcome!

 

Thanks...

Link to comment
Share on other sites

Looks like our godaddy server is hosting IIS and they say we won't have authority to create a task.

 

Are there any 3rd-party tools that could run a PHP URL once a day maybe?

 

surely godaddy has a chronjob in its cpanel, thats the way to go

Link to comment
Share on other sites

Looks like our godaddy server is hosting IIS and they say we won't have authority to create a task.

 

Are there any 3rd-party tools that could run a PHP URL once a day maybe?

 

surely godaddy has a chronjob in its cpanel, thats the way to go

 

I'm sure they do..but he said that they said "we won't have authority to create a task".

 

...which means he's probably on a really cheap hosting plan.  Most really cheap hosting plans do not let you do things like that. 

Link to comment
Share on other sites

Right..and it would have its own cron equivalent.  Virtually all systems have ability to schedule execution of something on a regular basis...I assure you that's not the issue.

 

Issue seems to be that he's apparently not allowed to, and its probably because he has some super cheap hosting plan

Link to comment
Share on other sites

Because setting up a sched task for a windows user... hell active directory itself, is SUPER ANNOYING to deal with. Generally, sched tasks on shared hosting machines can lead to security issues.

 

nix does a much better job of handling this kind of stuff, and crons are easily made with specific user permissions.

 

That's why even cheap nix plans generally allow crons. I have set up crons on a client's economy godaddy hosting plan. I can even set up SSH if I'd like.

 

Your solution is to get GoDaddy to move you to a Linux server, and use a cron.

Link to comment
Share on other sites

Yeah, we are stuck with IIS on this hosting package (there is both ASP.net and PHP involved).

 

Does anyone know of a 3rd party tool that could ping a PHP url? If I set up a file to poll MYSQL and send out emails, does anyone know of a service I could use to hit that URL on a nightly basis?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.