Sheduled jobs and automate access

Permalink 1 user found helpful
Hi,

Simple question but how do I realize this?
In System and Maintanence > Scheduled jobs is the following information:
-------------
If you wish to run these jobs in the background, automate access to the following URL:

http://localhost:8888/aandacht/index.php/tools/required/jobs?auth=5...
-----------------
It is a loacalhost so it won't work but I can't find in the documentation or forum in the concrete5.org site what is means and what it does and te most important part: where and how to do this? Do I have to place this url in my template or something?

Thanks in advance,
Mirjam

mirjamk
 
wormracer08 replied on at Permalink Best Answer Reply
wormracer08
It allows you to automate re-indexing, updating the sitemap and polling the email posts instead of manually doing it from the dashboard.

I use a cron job to do it as it's simple to set up.

cPanel makes it very easy to set up a cron just pick how often you want the job to run and use wget to visit the url.

Example:

0 0 * * * /usr/bin/wget -t 1 -q -O -http://yourdomain.com/tools/required/jobs?auth=YourToken

That will run your job once every day at midnight and send an email if there's an error. Your path may be different to wget but that's the basic command.
mirjamk replied on at Permalink Reply
mirjamk
Hi Wormracer08,

Thank you for your clear explanation.

I don't use cPanel but Plesk and I'm only allowed to view the scheduled tasks. I will ask my host to set this up for me.

But it is clear now what it means.

Regards,
Mirjam
wormracer08 replied on at Permalink Reply
wormracer08
Awesome, glad I could help.
chrison999 replied on at Permalink Reply
In case it happens to someone else, the command line you gave for crontab didn't work for me. I kept getting a "missing URL" error message. Removing the "-O" switch and changing "-http://" to "http://" fixed it. In other words, this is what worked on my system:

0 0 * * * /usr/bin/wget -t 1 -q  http://mydomain.com/tools/required/jobs?auth=MyToken


Thanks for pointing me in the right direction, though! I had been flailing on that question for awhile!

Regards,

Chris
roggy replied on at Permalink Reply
roggy
Your modification did the trick in my case .. on cPanel.


Thnx and regards!
tommyh replied on at Permalink Reply
tommyh
Hi,

I am trying to automate this process and when the cron runs I get this error for this.

/bin/sh:http://tommyhouse.com/main/index.php/tools/required/jobs?auth=b215b... No such file or directory

In C5 it tells me to run this: http;//tommyhouse.com//main/index.php/tools/required/jobs?auth=b215bf63b9bc65022daed43ed9844110

What am I missing or need to do to make this work right?

Any help would be appreciated.
Mnkras replied on at Permalink Reply
Mnkras
The jobs are running successfully
http://tommyhouse.com/main/index.php/tools/required/jobs?auth=b215b...

try using something like
curl http://tommyhouse.com/main/index.php/tools/required/jobs?auth=b215bf63b9bc65022daed43ed9844110&debug=1
tommyh replied on at Permalink Reply
tommyh
Thanks a bunch. I will give it a shot and see what happens. :)
stephanebeck replied on at Permalink Reply
stephanebeck
Is there a way to automate the "Generate Sitemap File" job ONLY?
And is it also possible to automate a DB backup?
Thanks!
chrison999 replied on at Permalink Reply
I, too, would appreciate hearing how to do an automatic DB backup via a cron job. Right now, I'm doing manual backups every once in awhile (i.e. whenever I remember), but it would be great to be more frequent/consistent.

Thanks!

Regards,

Chris
skram replied on at Permalink Reply
I'm also looking to run a process nightly (a custom Job I've written and installed) but can't figure out how to run just this ONE job nightly.
JohntheFish replied on at Permalink Reply
JohntheFish
If the jobs (ie site) are small enough to run in a web request, try
http://www.concrete5.org/marketplace/addons/nontab-scheduler/...

(but it doesn't run backup)