Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get Laracast example to fire MAC OSX Mavricks #67

Closed
jimmck opened this issue Aug 22, 2014 · 12 comments
Closed

Cannot get Laracast example to fire MAC OSX Mavricks #67

jimmck opened this issue Aug 22, 2014 · 12 comments

Comments

@jimmck
Copy link

jimmck commented Aug 22, 2014

Hi,

I create the cron command file and start crontab. But it never fires. If I enter the command manually, it works. When do crontab -l it shows the job????

  • * * * * php /Users/jimm/WebProjects/laravel42/artisan scheduled:run 1>> /dev/null 2>&1
@bkuhl
Copy link
Member

bkuhl commented Aug 24, 2014

Did you add this command via sudo crontab -e ?

When you say it's not firing, how are you verifying it's not firing? It may be an issue with the command you're trying to schedule.

@jimmck
Copy link
Author

jimmck commented Aug 24, 2014

Hi Ben
I need to set path in cron file. It was not finding PHP. Great work by the
way! All is good. Thanks for the follow up.
Jim
On Aug 24, 2014 3:09 PM, "Ben Kuhl" notifications@github.com wrote:

Did you add this command via sudo crontab -e ?

When you say it's not firing, how are you verifying it's not firing? It
may be an issue with the command you're trying to schedule.


Reply to this email directly or view it on GitHub
#67 (comment).

@bkuhl
Copy link
Member

bkuhl commented Aug 24, 2014

Thanks! Glad to hear you got it working!

@bkuhl bkuhl closed this as completed Aug 24, 2014
@phuclh
Copy link

phuclh commented Jan 10, 2015

@jimmck I has same problem with you. The command works when I run it in terminal but crontab not fires. Please help me.

@bkuhl
Copy link
Member

bkuhl commented Jan 10, 2015

Which crontab did you add it to? The root crontab or a specific user's crontab?

@phuclh
Copy link

phuclh commented Jan 10, 2015

I create a cron.txt in my folder project and using crontab cron.txt command

@bkuhl
Copy link
Member

bkuhl commented Jan 10, 2015

Which user are you running that command as? Can you also provide the contents of the cron.txt?

@phuclh
Copy link

phuclh commented Jan 10, 2015

This is my cron.txt file:

* * * * * php /Users/mac/Code/myproject/artisan scheduled:run 1>> /dev/null 2>&1

@jimmck
Copy link
Author

jimmck commented Jan 10, 2015

Hi,

I had to put the path in my cron file. Once done done, all works fine.
MAC OSX, Laravel 4, PHP 5.6.3

Here is my file:

SHELL=/bin/bash
PATH=/Applications/:/Applications/XAMPP/xamppfiles/bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

  • * * * * php /Users/jimm/WebProjects/laravel42/artisan scheduled:run 1>>
    /dev/null 2>&1

Regards,
Jim

On Sat, Jan 10, 2015 at 2:34 PM, phuclh notifications@github.com wrote:

This is my cron.txt file:

  • * * * * php /Users/mac/Code/myproject/artisan scheduled:run 1>>
    /dev/null 2>&1


Reply to this email directly or view it on GitHub
#67 (comment).

@bkuhl
Copy link
Member

bkuhl commented Jan 10, 2015

@phuclh Which crontab did you setup that cron on? If it's on the root crontab then that cron command is invalid and will not run. It's on the root crontab if you added while either....

  1. Being logged in as root
  2. used sudo crontab or some other sudo to edit/install the cron

@phuclh
Copy link

phuclh commented Jan 10, 2015

I edit my cron.txt file like:
SHELL=/bin/bash
PATH=/Applications/:/Applications/XAMPP/xamppfiles/bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

  • * * * * php /Users/mac/Code/myproject/artisan scheduled:run 1>> /dev/null 2>&1

And It fired :D.

Thank you very much @jimmck @bkuhl

@jimmck
Copy link
Author

jimmck commented Jan 10, 2015

Cool !!! Enjoy!

Jim

On Sat, Jan 10, 2015 at 2:59 PM, phuclh notifications@github.com wrote:

I edit my cron.txt file like:
`SHELL=/bin/bash

PATH=/Applications/:/Applications/XAMPP/xamppfiles/bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

  • * * * * php /Users/mac/Code/myproject/artisan scheduled:run 1>>
    /dev/null 2>&1`

And It fired :D.

Thank you very much @jimmck https://github.com/jimmck @bkuhl
https://github.com/bkuhl


Reply to this email directly or view it on GitHub
#67 (comment).

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

No branches or pull requests

3 participants