|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Crontab: rewriting a file
Hi,
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!
__________________
:-) |
|
#2
|
|||
|
|||
|
>> stdin: is not a tty
Because your option (--login) requires interactive. When it's interactive it doesn't read from stdin or ARGV. |
|
#3
|
|||
|
|||
|
Thanks for the reply freebsd.
I tried removing the -login but the code was not run. As far as I can see the -login tells bash to act as a login shell allowing code to be run as if running it from the command prompt. Any other advice from anyone would be appreciated. Thanks in advance. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Linux Help > Crontab: rewriting a file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|