SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Mar 2013
    Location
    Chennai, India
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How can I set a cron and how can I execute it in Unix, Linux, and windows?

    How can I set a cron and how can I execute it in Unix, Linux, and windows?

  2. #2
    SitePoint Addict
    Join Date
    Sep 2005
    Posts
    271
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    crontab -e

    then enter your cron in that file. Write it and save it and the cron will automatically run.

  3. #3
    I solve practical problems. bronze trophy
    Michael Morris's Avatar
    Join Date
    Jan 2008
    Location
    Knoxville TN
    Posts
    2,011
    Mentioned
    56 Post(s)
    Tagged
    0 Thread(s)
    As a security precaution, do not put your cron PHP files in a directory that can be browsed to by the webserver. You can test them by calling PHP from the command line.. php scriptname.php. For more information on using PHP from the command line look here: http://php.net/manual/en/features.commandline.php

    Also, keep in mind php command line tasks do not have a time limit enforced on them. This is a good thing if the task needs time, but it does mean they can hang more easily.


Bookmarks

Posting Permissions

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