Solved

using PHP to run scheduled tasks like the ColdFuion Scheduler

Posted on 2010-11-26
4
275 Views
Last Modified: 2012-05-10
I have used ColdFusion in the past using the CFSCHEDULE function to run scheduled tasks or queries each morning.  Is there something similar in PHP to the C.F. Scheduler?  
0
Comment
Question by:ssailer
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
leehanken earned 350 total points
Comment Utility
Cron is a time-based job scheduler in Unix-like computer operating systems. The name cron comes from the word "chronos", Greek for "time". Cron enables users to schedule jobs (commands or shell scripts) to run periodically at certain times or dates. It is commonly used to automate system maintenance or administration, though its general-purpose nature means that it can be used for other purposes, such as connecting to the Internet and downloading email.

-Wikipedia
0
 
LVL 1

Assisted Solution

by:pak_slm
pak_slm earned 150 total points
Comment Utility
If your cPanel support cron job then try as

0 0 */20 * * php -q /home//doc_expiry_email.php

it run evry 20th day
0
 

Author Comment

by:ssailer
Comment Utility
I'm fairly new to PHP.  Is this something that all hosts offer, or do some have it disabled so tasks can't run automatically?  This site is currently being hosted by Go Daddy.  
0
 
LVL 1

Expert Comment

by:pak_slm
Comment Utility
It depends upon hosting company and your package. Kindly consult with hosting company if they have cron job option.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now