Cron and Media Temple

Permalink
I am trying to set up a cron job to index my search engine on a daily basis. I got the correct script through the C5 dashboard and set up the Cron Job in Media Temple. It's not working. I get the following email notification after it's scheduled run:

/bin/sh:http://www.usj.edu/index.php/tools/required/jobs?auth=...ID=2:... No such file or directory

Does anyone know what needs to be done to get a C5 cron job set up in Media Temple?

kreative
 
hutman replied on at Permalink Reply
hutman
I'm not entirely sure how you manage cron jobs with media temple - but it looks like you're trying to execute the URL instead of calling it via a browser or other tool. Your should be able to use wget to correct this.

Here's what your cron entry should look like:

wget -q http://www.usj.edi/index.php/tools/required/jobs?auth=...   >/dev/null 2>&1


The >/dev/null 2>&1 at the end just makes sure that the job output gets dumped instead of generating an email every time it runs.

Hope that helps.
kreative replied on at Permalink Reply
kreative
Thanks for your response.

Here’s what works for Index Search Engine - Updates:
/usr/bin/wget -O - -q -t 1 "http://www.usj.edu/index.php/tools/required/jobs/run_single?auth=81cce7082ac1de730f11c3f9f4e6565e&jID=1”
I had to use quotes around the URL

If I try the same syntax for the Index Search Engine – All job, it just stalls. I assume it’s a memory limit issue so I increased the memory limit in php.ini to 384M but that didn’t help.

So I suppose I could keep using Index Search Engine – Updates and run the All version manually but it would be great to know what the trick is to get the All version running too.
JohntheFish replied on at Permalink Reply
JohntheFish
Search engine all is best run as a queueable (sliced) job. Run that way it won't schedule by itself. If using cron you need to run the ticker job on a short interval and the ticker job then runs queued slices of the search engine all job.
kreative replied on at Permalink Reply
kreative
I couldn't get that to work either. The job just hangs.
Tate204 replied on at Permalink Reply
Tate204
You may tryhttp://www.easycron.com/ as a trigger, easy to find issue.
kreative replied on at Permalink Reply
kreative
Thanks for the reply. Tried it and it did the same thing. The job just hangs.