March 12th, 2002, 07:25 AM
Join Date: Mar 2001
Time spent in forums: 1 h 51 m 27 sec
Reputation Power: 13
Crontab: rewriting a file
I need to recreate some php code files using the crontab. I already use the crontab to run several peices of php code for updating databases, but when I try to set up an entry for rewriting a php file I either get an error (stdin: is not a tty) or it does nothing at all.
This is a rough up of what I'm trying:
file1.php: this is the file to be rewritten
file2.php: contains the php code for recreating file1.php
the first line of file2.php is
#!/path to php/php -q
file3.sh: contains the line
/path to file2/file2.php > /path to file1/file1.php
In the crontab I have:
10,30,50 8-16 * * * /path to bash/bash -login -c /path to file3/file3.sh &
Hope someone can understand this!