Jump to content

Recommended Posts

Posted

I'm a newbie that needs to run a cron job on a reseller account. I read everything I can find in this forum and documents from Moodle. So far no luck with different emailed results like: (this is just a temporary setup until I move it to the real domain)

 

15 * * * * /usr/local/bin/php /home/andymansker/moodle/admin/cron.php

/bin/sh: line 1: 15: command not found

 

<****@server47> /home/andymansker/moodle/admin/cron.php

/bin/sh: line 1: /home/andymansker/moodle/admin/cron.php: No such file or directory

 

and perhaps the most successful:

<****@server47> /usr/local/bin/php /home/andymansker/moodle/admin/cron.php

Could not open input file: /home/andymansker/moodle/admin/cron.php.

 

A direct URL to the file runs fine. The file is located as shown in the path above.

 

Moodle info is here:

http://moodle.org/doc/?file=install.html#cron

 

It seems like this would work:

15 * * * * /usr/local/bin/php /home/andymansker/moodle/admin/cron.php

 

 

Any help is appreciated!

Posted

It looks to me like the server path to the cron.php isn't quite right - the public_html directory is missing from the path. I think your cron command should be the following:

>php /home/andymansker/public_html/moodle/admin/cron.php

Posted (edited)

FIXED!Thanks David. I finally looked at an installation of Gallery and found the correct path is:

 

/usr/local/bin/php /home/username/public_html/pathtocron/yourcron.php

 

The actual domain name is not used.

Edited by amansker
Posted

This info should go into a FAQ or tutorial since it is not available at this time and a Help Ticket resulted in:

 

Please be advised that the help desk does not provide developer level support for the building of html code or web pages including third party scripts.

 

Who can do that?

Posted

Your problem was figuring out the correct server path to a particular file on your account. That question could have been answered by either the Help Desk or these forums. I don't know what you put in your Help Desk ticket, but if it looked like your first post in this thread (asking how to set up a cron job for Moodle), their response was the correct one.

Posted
Your problem was figuring out the correct server path to a particular file on your account. That question could have been answered by either the Help Desk or these forums.

 

 

1. I did post in this forum - I appreciate your response, but it was the incorrect path.

 

2. Before posting in this forum I did a thorough search of the forum, knowledge base and external sites. After clicking submit Help Ticket, I followed the suggested link to a Linux site and reviewed information, but could not find the answer.

 

3. The subject on the Help Ticket is "Cron Job Path." I simply asked for the path from cPanel and included my previous attempts and results. They kindly suggested it was a permissions problem.

 

4. I reviewed my original post and see your point - should have clarified the issue in subject. I just wasn't sure if my path was the problem or it was something else.

 

I have invested two hours of my time to figure this out and it might save someone some time if it was documented in a FAQ/tutorial/knowledge base.

Posted
1. I did post in this forum - I appreciate your response, but it was the incorrect path.

I made my best guess based on the limited info you provided. You didn't provide the working URL to your cron.php, nor did I have any way of knowing that the "andymansker" you were including in the path was not your CPanel username - that you were guessing at that part of the directory path.

 

4. I reviewed my original post and see your point - should have clarified the issue in subject. I just wasn't sure if my path was the problem or it was something else.

Taken all together, the error messages indicated to me that the path to cron.php was not correct, but not everyone sees the same things I do at the same time. :)

 

I have invested two hours of my time to figure this out and it might save someone some time if it was documented in a FAQ/tutorial/knowledge base.

I'm sorry you spent 2 hours on an issue that could have been resolved in 5 minutes, had the issue been framed correctly. Questions about the proper server path to a script or file are answered here in the forums all the time, so I don't know what else to tell you. :angry:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...