Gunnar Hjalmarsson
Tue, 28 Dec 2004 18:19:47 -0800
My hosting company will not allow me shell access. Accordingly I have installed mhonarc using the mhastart.pl script. Using the "Other MHonArc command" dialogue box I have created the archive, customised the output and MHonArc recognises my resource file.
However, I am at a loss to know how I can automate this process via Cron.
It's not the creation of the archive you want to automate, is it?
I know how to call the script, but how do I get the script to run my command line? Presumably I need to hack the script; I have spent a long time looking through it, but as a complete hacker, I am unsure as to where to edit the script.
I don't think there is any need to modify the script. Assuming you have a POP account, set the config variables accordingly and just call the script without arguments. The script will then check the POP account, update the mbox file if it finds new messages, and update the archive.
Incidentally, mhastart does not recognise my resource file if it is not invoked through the command line; I am unclear whether this is what is intended or not.
That's intentional, since the resource settings should be saved in the .mhonarc database. If you *change* something in the resource file, you may need to use the "Other MHonArc command" to update the database and the archive with the new settings, but as long as you only are updating the archive with new messages, there should be no need to call the resource file.
-- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl