dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: Can I use a cron job to do this?

  1. #1
    Join Date
    May 2009
    Posts
    124

    Can I use a cron job to do this?

    I would like to set up a system where every time I have a new customer on my site I send them an email a few days after their purchase to ask for some feedback. I would like to send them another email a few weeks later and a few weeks after that.

    I wanted to do this via aweber, but it looks like I can only use their form. (I posted earlier about this.) But, the more I read I think I can do this with cron jobs and it won't cost me anything.

    So, do I understand this right? I am thinking I can set up a cron job to run at a certain time each day. The job would run a script that would make a list out of every customer who made a purchase 3 days ago and send them an email. Then, it would make a list out of every customer who made a purchase 3 weeks ago and send them a different email. etc....

    Does this make sense?

  2. #2
    Join Date
    Mar 2010
    Location
    Singapore
    Posts
    367
    Quote Originally Posted by DrMarie View Post
    I would like to set up a system where every time I have a new customer on my site I send them an email a few days after their purchase to ask for some feedback. I would like to send them another email a few weeks later and a few weeks after that.

    I wanted to do this via aweber, but it looks like I can only use their form. (I posted earlier about this.) But, the more I read I think I can do this with cron jobs and it won't cost me anything.

    So, do I understand this right? I am thinking I can set up a cron job to run at a certain time each day. The job would run a script that would make a list out of every customer who made a purchase 3 days ago and send them an email. Then, it would make a list out of every customer who made a purchase 3 weeks ago and send them a different email. etc....

    Does this make sense?
    Yes. In fact in my working career, I have written such programs for a lot of business requirements. I call them back-end batch processing programs. I believe a lot of organizations use this simple strategy to fulfill their business requirements.

    The only down-side to such strategy is the time lag due to the job only triggered on certain time of the day or week or whatever. So depending on your business requirements, it may work for some while it may not work for some, especially for requirements that need immediate processing.

  3. #3
    Join Date
    Mar 2010
    Posts
    2,803
    yes you can set up a cron job to do all that for you.

    'in theory' all you would need to do is write the php script to do all that as a 'one off' job and then submit that php script as a cron job on your web server to run at whatever intervals you specify. How you create cron jobs will depend on your web hosting account.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles