[HCoop-Help] how to write to files using cron?

Adam Chlipala adamc at hcoop.net
Wed Dec 23 08:41:48 EST 2009


Alexandre Santos wrote:
> I'm having difficulties setting up a cron job, and would need some help:
>
> The cron job launches a script that should append text to a file.
> Here's an example in the .crontab:
>
> * * * * * run-in-pagsh --fg date date>>  $HOME/folder/file.txt
>    

I think this is the result of a simple confusion: the ">>" notation is 
being interpreted by the initial shell process, not run inside a pagsh.  
Therefore, the file writing happens without AFS tokens.  You could fix 
the problem by putting the whole command to run inside a separate shell 
script, using some additional quoting, etc..



More information about the HCoop-Help mailing list