<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic cron task to restart in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/cron-task-to-restart/m-p/328419#M15420</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I want to write a cron task to restart nuxeo each week.
For that I have write a script called by the cron task.&lt;/P&gt;
&lt;P&gt;When I execute the script myself, it works fine...
But, when the script is executed by the cron task, all services (postgres, apache and shibboleth) are correctly restarted but not nuxeo.&lt;/P&gt;
&lt;P&gt;It's stopped but not restarted. Do you have any idea ?&lt;/P&gt;
&lt;P&gt;The cron task is executed as root user :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;	# Arret Apache
	/Doc/apps/apache2/bin/apachectl stop
	
	# Arret Shibboleth (il y a p.e mieux ?)
	pkill -x shibd
	
	# Arret Postgres
	/etc/init.d/postgresql-9.5 stop
	
	# Arret Nuxeo
	export JAVA_HOME=/Doc/apps/jdk1.8.0_73/
	export LPATH=`/bin/cat /Doc/apps/PATH`
	export PATH=${LPATH}:${JAVA_HOME}/bin:${PATH}
	export NUXEO_CONF=/Doc/apps/ulr-config-nuxeo-71/nuxeo.conf
	/Doc/apps/nuxeo-cap-7.10-tomcat/bin/nuxeoctl stop

	# Demarrage Postgres
	export PGDATA=/Doc/Postgresql/9.5/data
	/etc/init.d/postgresql-9.5 start

	# Demarrage Nuxeo
	export LD_LIBRARY_PATH=/Doc/apps/shibboleth-sp/lib:/Doc/apps/apache2/lib:$LD_LIBRARY_PATH
	/Doc/apps/nuxeo-cap-7.10-tomcat/bin/nuxeoctl start

	# Lancement de shibboleth-sp
	/Doc/apps/shibboleth-sp/sbin/shibd -fc /Doc/apps/shibboleth-sp/etc/shibboleth/shibboleth2.xml
	# Lancement Apache
	/Doc/apps/apache2/bin/apachectl start


&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 15 Dec 2017 14:02:46 GMT</pubDate>
    <dc:creator>Mohamed_Belmokh</dc:creator>
    <dc:date>2017-12-15T14:02:46Z</dc:date>
    <item>
      <title>cron task to restart</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/cron-task-to-restart/m-p/328419#M15420</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I want to write a cron task to restart nuxeo each week.
For that I have write a script called by the cron task.&lt;/P&gt;
&lt;P&gt;When I execute the script myself, it works fine...
But, when the script is executed by the cron task, all services (postgres, apache and shibboleth) are correctly restarted but not nuxeo.&lt;/P&gt;
&lt;P&gt;It's stopped but not restarted. Do you have any idea ?&lt;/P&gt;
&lt;P&gt;The cron task is executed as root user :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;	# Arret Apache
	/Doc/apps/apache2/bin/apachectl stop
	
	# Arret Shibboleth (il y a p.e mieux ?)
	pkill -x shibd
	
	# Arret Postgres
	/etc/init.d/postgresql-9.5 stop
	
	# Arret Nuxeo
	export JAVA_HOME=/Doc/apps/jdk1.8.0_73/
	export LPATH=`/bin/cat /Doc/apps/PATH`
	export PATH=${LPATH}:${JAVA_HOME}/bin:${PATH}
	export NUXEO_CONF=/Doc/apps/ulr-config-nuxeo-71/nuxeo.conf
	/Doc/apps/nuxeo-cap-7.10-tomcat/bin/nuxeoctl stop

	# Demarrage Postgres
	export PGDATA=/Doc/Postgresql/9.5/data
	/etc/init.d/postgresql-9.5 start

	# Demarrage Nuxeo
	export LD_LIBRARY_PATH=/Doc/apps/shibboleth-sp/lib:/Doc/apps/apache2/lib:$LD_LIBRARY_PATH
	/Doc/apps/nuxeo-cap-7.10-tomcat/bin/nuxeoctl start

	# Lancement de shibboleth-sp
	/Doc/apps/shibboleth-sp/sbin/shibd -fc /Doc/apps/shibboleth-sp/etc/shibboleth/shibboleth2.xml
	# Lancement Apache
	/Doc/apps/apache2/bin/apachectl start


&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Dec 2017 14:02:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/cron-task-to-restart/m-p/328419#M15420</guid>
      <dc:creator>Mohamed_Belmokh</dc:creator>
      <dc:date>2017-12-15T14:02:46Z</dc:date>
    </item>
  </channel>
</rss>

