1

Greeting all

I started working with Laravel 4 and I must say I just love it, and one of the stuffs I like about it is the artisan command.

And I created one, an artisan command that fetches posts from my database and tweets them to my official twitter page, my artisan command works pretty well and tweets the number of posts which I had set it to.

Now my problem is the cron job, I need to set it up in the cron tab, so it can be tweeting an X-number of post titles over a 10 min period (I have read up on how to do the timing), what have been giving me some issues is how to get the path to artisan correctly in the cron tab editor and am using DIGITAL OCEAN Linux 12.04 with no additional panel.

Look at how my file is organized (attached image)site structure

How do I set up the path to artisan in my cron tab?

I tried using this Cron Job in Laravel couldn't get it right.

Thanks.

Community
  • 1
  • 1
Normal9ja
  • 91
  • 1
  • 16

1 Answers1

0

Just use the Laravel 4 Dispatcher package: https://github.com/Indatus/dispatcher

Then you can schedule this command, and many others through your application, rather than the server.

Laracasts has a (paid) lesson on this package here.

Laurence
  • 58,936
  • 21
  • 171
  • 212
  • I will check it out, but I still want to know how to get the full path, incase of when it is the last resort – Normal9ja Aug 24 '14 at 06:22