Erm, I am presuming your script shall delete the file after it analized it?
If so, check for the user as whom your script gets executed by cron AND check the permissions of the file you want to read.
Have a nice day All decision is left to your taste Update
why:
If your script tries to read the file and doesn't die upon failure to such attempt, it will proceed and delete the file, for this it might have enough permissions :-)
On the other hand, what conditions do you check to attempt openening the file and are these the same conditions to be met to delete it?
Comment on Re: Script works different when it runs as cron
Well, so feel free to post some code you are using, so we can help you on that one, as its only guessing right now.
And NO, please don't post the full code, as the processing of the files content isn't the problem, but the rest of your script :-)
Have a nice day All decision is left to your taste