This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes Crontab & Procmail problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Crontab & Procmail problem" Watch "Crontab & Procmail problem" New topic
Author

Crontab & Procmail problem

Prajakti Joshi
Greenhorn

Joined: May 29, 2002
Posts: 2
Hi,
I'm trying to run a perl script through the procmail in a crontab. But I'm getting an error "Error writing to file", when the cron runs. However, when I run the same script from command line, it works fine, without any errors.
Following is the procmailrc file :

I'm getting the error when it tries to run ParseMail.pl.
Can anyone help me out on this?
Thanks,
Prajakti.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17142
    
  27

Look in parsemail.pl and see if it's making any assumptions about what the current working directory may be (relative paths).


An IDE is no substitute for an Intelligent Developer.
Prajakti Joshi
Greenhorn

Joined: May 29, 2002
Posts: 2
Hi,
Actually I'm calling a script from ParseMail.pl, which in turn uses Metamail along with "expect". Following is the code in the script :

When it's run manually, the script works fine, but when set in a cron, it doesn't seem to work.
Thanks,
prajakti.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Crontab & Procmail problem
 
It's not a secret anymore!