Rizwan Saleem
Rizwan Saleem

Reputation: 896

Cron job not working using crontab linux

I try to run my laravel command through cron job. But when I put my laravel command into cron job using crontab after adding in cron tab i did not see the working on cron job because my database not updated. Below is my cron tab file

# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h  dom mon dow   command
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/java-8-oracle/bi$
SHELL=/bin/bash
[email protected]
* * * * * php /home/isnap/test/api/local artisan command:trending_posts_view && /tmp/myscript.sh

Help to solve this issue

Upvotes: 0

Views: 120

Answers (1)

Marcin Nabiałek
Marcin Nabiałek

Reputation: 111829

I think it should be:

* * * * * php /home/isnap/test/api/local/artisan command:trending_posts_view && /tmp/myscript.sh

(space between local and artisan replaced with slash)

Upvotes: 2

Related Questions