Localhost in email sent

Hi,

After doing some tests and reading some posts, I decided to deactivated the acron plugin mainly for this reason: [quote=“ctgraham, post:15, topic:25320”]
Note that if no one browses your site on a particular day, Acron will not be able to run any scheduled tasks on that day
[/quote]

Also, there was some inconsistency in the display of the submission links in the email sent that I could not explain: sometimes I would get the “localhost” mention, other time I had the IP address of the server and finally the right DNS.

For the crontab, I read the docs/README and this excellent post: Any howto "crontab" somewhere? - #3 by marc. To solve the problem I had with localhost I found this [quote=“ctgraham, post:14, topic:8972, full:true”]
For anyone else who stumbles on this topic, I want to note that we had trouble calling the crontabs via an absolute pathname (for example, 0 0 * * * php /www/journal1/tools/runScheduledTasks.php). In particular, scheduled tasks which depend on calculating a journal base_url (like the PLN) were unable to accurately do so. A more reliable method (but maybe not perfect) is to cd to the OJS root directory and to run the command from there with a relative path (for example, 0 0 * * * cd /www/journal1/; php tools/runScheduledTasks.php).
[/quote]

For anyone who might be interested, I added to apache crontab for each job running in MySQL table schedule_tasks:

0 * * * * cd /var/www/html/www.root.folder; php tools/runScheduledTasks.php > /tmp/job-alheure-ojs.log 2>&1
0 * * * * cd /var/www/html/www.root.folder; php tools/runScheduledTasks.php lib/pkp/plugins/generic/usageStats/scheduledTasks.xml > /tmp/job-alheure-ojs-usageStats.log 2>&1
0 * * * * cd /var/www/html/www.root.folder; php tools/runScheduledTasks.php plugins/importexport/crossref/scheduledTasks.xml > /tmp/job-alheure-ojs-crossref.log 2>&1
0 * * * * cd /var/www/html/www.root.folder; php tools/runScheduledTasks.php plugins/importexport/datacite/scheduledTasks.xml > /tmp/job-alheure-ojs-datacite.log 2>&1
0 * * * * cd /var/www/html/www.root.folder; php tools/runScheduledTasks.php plugins/importexport/medra/scheduledTasks.xml > /tmp/job-alheure-ojs-medra.log 2>&1

Emails are now sent with the hostname in the URL, jobs run smoothly at pace I decided.
End of the story.

1 Like