Skip to content

Conversation

@channor
Copy link

@channor channor commented May 25, 2017

I recently solved a issue with cron jobs on my shared hosted server. By following these docs, I could not solve the problem. In this PR I have added a description that might work for some developers on shared hosting.

If you like whats added, I hope the position of what is added and the formatting looks okay.

@markstory markstory modified the milestones: 2.x, 3.x May 25, 2017
---------------------------
On some shared hostings ``cd /full/path/to/root && bin/cake myshell myparam`` might not work. Instead you can use ``php /full/path/to/root/bin/cake.php myshell myparam``

**Notice**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should use the note blocks. Add

.. note::
   register_argc_argv ....

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for feedback 👍

Added note block as requested
@jeremyharris
Copy link
Member

jeremyharris commented May 25, 2017

The previous paragraph on the same page spells cron job as cronjob, so I'd use that instead of cron-job.

Also, I wonder about even recommending cd && bin/cake. Perhaps we should remove that bit and change the example to always use the full path?

edit: to clarify, I think we should change the example to use a /full/path/to/bin/cake myShell myParam instead of recommending cd /full/path/to && bin/cake

@channor
Copy link
Author

channor commented May 25, 2017

Yes, we should keep the spelling the same.

I added this paragraph because what comes after cd /full/path/to/root && bin/cake was not "read" when the cron was run (myshell myparam wasn't "read") (with my shared hosting (cPanel) ).

Command /full/path/to/root/bin/cake outputs the cake console with my cron jobs, so I can verify that works, but I cannot tell if /full/path/to/root/bin/cake myshell myparam works as I need php to run shells. If someone can verify that /full/path/to/root/bin/cake myshell myparam works, I agree that should be the example.

Corrected some spelling, and corrected the note block.
@markstory markstory self-assigned this May 26, 2017
@markstory markstory merged commit c35158d into cakephp:3.0 May 26, 2017
okinaka added a commit to okinaka/docs that referenced this pull request May 27, 2017
@okinaka okinaka mentioned this pull request May 27, 2017
HavokInspiration added a commit that referenced this pull request Jun 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants