Cron - Maintenance Tasks
Permalink
Has/is anyone actually used/using the cron job listed under the Dashboard Maintenance button?
http://www.domainname.com/index.php/tools/required/jobs?auth=bdc1b5...
My site is running on a UNIX web server. Through cPanel I have set up a "standard" cron job but the command line above does not seem to produce cron output. Are modifications need to the command line for Unix/standard cron job?
My server produces the following message when the command line above is run:
/bin/sh:http://www.domainname.com/index.php/tools/required/jobs?auth=bdc1b5... No such file or directory
Thanks.
http://www.domainname.com/index.php/tools/required/jobs?auth=bdc1b5...
My site is running on a UNIX web server. Through cPanel I have set up a "standard" cron job but the command line above does not seem to produce cron output. Are modifications need to the command line for Unix/standard cron job?
My server produces the following message when the command line above is run:
/bin/sh:http://www.domainname.com/index.php/tools/required/jobs?auth=bdc1b5... No such file or directory
Thanks.
Surely someone has or is using cron to run maintenance tasks with Concrete5??
on linux you set a file to "executable". This doesn't work with urls..
chmod +x file.sh also works with files and not urls.
you need a tool that sends a http request.
"wgethttp://sdfsf"
which downloads the output..
but you can also use php instead of sh to execute a script. Create a script on your local server which is executable, like this:
chmod +x file.sh also works with files and not urls.
you need a tool that sends a http request.
"wgethttp://sdfsf"
which downloads the output..
but you can also use php instead of sh to execute a script. Create a script on your local server which is executable, like this:
#!/usr/bin/php <?php readfile('http://sdfsdf'); ?>
looks like that forum creates fancy links. It should look like this of course:
readfile('httb://youraddress/index.php/tools/required/jobs?auth=asdf')
readfile('httb://youraddress/index.php/tools/required/jobs?auth=asdf')
Cron only executes a command. You cannot use just an URL.
You can try the following command:
wgethttp://www.domainname.com/index.php/tools/required/jobs?auth=bdc1b5...
But wget needs to be installed on your server. If not you, you have to use another command line tool or write some script and execute that.
You can try the following command:
wgethttp://www.domainname.com/index.php/tools/required/jobs?auth=bdc1b5...
But wget needs to be installed on your server. If not you, you have to use another command line tool or write some script and execute that.
I use cron for the maintenance tasks on all my sites. Here is a variant of what I use in my crontab:
25 */2 * * * /usr/bin/wget -t 1 -q -O -http://blah.com/index.php/tools/required/jobs?auth=7890......
This runs the maintenance tasks every other hour at twenty-five after.
25 */2 * * * /usr/bin/wget -t 1 -q -O -http://blah.com/index.php/tools/required/jobs?auth=7890......
This runs the maintenance tasks every other hour at twenty-five after.
Thanks for the code, unfortunately I'm receiving an error:
wget: missing URL
Usage: wget [OPTION]... [URL]...
Try `wget --help' for more options.
I'm not sure I understand what the number '1' is for the command above the --help doc doesn't help much either. UPDATE: the number is for the '-t' option setting the number of retries.
wget: missing URL
Usage: wget [OPTION]... [URL]...
Try `wget --help' for more options.
I'm not sure I understand what the number '1' is for the command above the --help doc doesn't help much either. UPDATE: the number is for the '-t' option setting the number of retries.
Instead of using a cron job, the add-on Nontab Scheduler
https://www.concrete5.org/marketplace/addons/nontab-scheduler/...
Works beautifully and it's free. Plus, it's nice to know I don't have rely on setting up a cron. Although it would be a nice option.
https://www.concrete5.org/marketplace/addons/nontab-scheduler/...
Works beautifully and it's free. Plus, it's nice to know I don't have rely on setting up a cron. Although it would be a nice option.
I think there needs to be a space between the "-" hyphen and http://
I also like to put my url in quotes
Should look like:
25 */2 * * * /usr/bin/wget -t 1 -q -O - "http://blah.com/index.php/tools/required/jobs?auth=7890......"
I also like to put my url in quotes
Should look like:
25 */2 * * * /usr/bin/wget -t 1 -q -O - "http://blah.com/index.php/tools/required/jobs?auth=7890......"
Thanks nteaviation & everydaycode, it works! The CRON JOB COMMAND:
Works at running Scheduled Jobs for c5 in CPanel.
/usr/bin/wget -t 1 -q -O - "http://blah.com/index.php/tools/required/jobs?auth=3245cf43c..."
Works at running Scheduled Jobs for c5 in CPanel.
everydaycode probably had it correct, but the forum text editor tossed the all important space character. It did it on me the first time. I had to be persistent and "force" a space :)
Sorry to hit an old thread, but I used this as an example and I'm not SURE that it's working. It's in my /etc/cron.hourly and if I look at /var/log/cron I can see that my script is launched but it finishes in 1 sec AND the run dates on the "Automated Jobs" dialog in the dashboard are NOT being updated. Is there any other place to look to see if anything is happening or any other things I need to do to make this work?
Thanks!
Thanks!
Ok - got it - I needed to remove the "-q" parameter from the wget to see the error messages. Then I saw that it was a certificate problem. Once I got that resolved, it ran!