Thread: cron a script?

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Location
    UK
    Posts
    101
    Rep Power
    11

    cron a script?


    how would i cron a perl script to to chmod all php files to 755 or is there an easier way, could i just : crontab chmod *.php 755. would those work?
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,594
    Rep Power
    4207
    First run this:
    man 5 crontab

    This will show you the format of how to place commands in your crontab.

    Next, to edit your crontab file, you need to do:
    crontab -e

    This will bring up your crontab file and you can edit it and add the commands that you like. Don't forget to specify absolute pathnames, as in:

    /bin/chmod 755 /path/to/*.php
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo

IMN logo majestic logo threadwatch logo seochat tools logo