function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
IanSampsonIanSampson 

Email to case: How to set up Cron job to keep EmailAgent running on Apache?

I'd really appreciate some help on the final steps of getting the email agent to work for me.

I have set up a VPS (virtual private server) with Westhost on an Apache sever. (I know nothing about Java and Unix BTW!)

I have installed the EmailAgent on the server and configured it correctly. If I log in using Putty (a SSH client), change to the EmailAgent directory in the root and then execute the command

java -jar /EmailAgent/Email2Case.jar /EmailAgent/sfdcConfig.txt /EmailAgent/log4j.properties

then everything works beautifully, it moves emails, drops attachments onto the server and every couple of minutes, check for new emails.

However as soon as I close the PUTTY session, the Java application stops and emails are not processed.

I have tried putting the above command into a Cron jab (and I know it's being executed) but the EmailAgent app does not run.

What am I doing wrong. Is there a better way of setting this up? Any assistance would be much appreciated.

Thanks
Ian
IanSampsonIanSampson
The actual entry in my Cron job is:

*/2 * * * * "java -jar /EmailAgent/Email2Case.jar /EmailAgent/sfdcConfig.txt /EmailAgent/log4j.properties" /dev/null
elbe15elbe15
Hi Ian,

for me the linux "screen"-program works fine. If you close the ssh session, the "screen" command prompt is still alive.
Here you find more about "screen":
http://www.linuxforums.org/applications/the_screen_program.html

Regards elbe15