Cron not working?

Hi,

I setup the cron, and disabled “real time updating” in the settings, but for some reason it doesn’t seem to work. Please see the attached image, which clearly shows 18 visits in the last 24 hours… yet nothing showing on the graph?

I have the following cron setup (and tried manually running it as well);


# piwik stuff
5 * * * * /usr/bin/php /var/xxxx/steampunkjunkies.net/www/track core:archive --url=http://steampunkjunkies.com/track/ > /var/xxxxx/steampunkjunkies.net/track/piwik-archive.log
10 * * * * /usr/bin/php /var/xxxxx/steampunkjunkies.net/www/track core:archive --url=http://steampunkjunkies.net/track/ > /var/xxxxxx/steampunkjunkies.net/www/track/piwik-archive2.log

…and no output was given into the log files (i.e errors) … so I’m a bit confused as to what I’m missing :confused: (as you can see, the stats worked fine before I disabled Allow Piwik archiving to trigger when reports are viewed from the browse => No

TIA

Andy

did you create this with crontab -e (as a user) or with sudo?

what happens when you try from the command line (I suspect a permissions issue).

user@piwikserver: su yourcrontabowner_username -c “/usr/bin/php /var/xxxx/steampunkjunkies.net/www/track core:archive --url=http://steampunkjunkies.com/track”

did you confirm /usr/bin/php and not /usr/bin/php5?

[edit] which flavour of linux are you using?
may want to take a peak in /var/log/syslog to see if there are errors which will likely be in red background if you view with:
vi /var/log/syslog

this will also show if cron is running the process:
zgrep -i cron /var/log/syslog* | grep track

Thanks for the reply. I feel like a total idiot! I had:

/var/xxx/steampunkjunkies.net/www/track

… but thats the folder. It needed to have the /console part as well:

/var/xxx/steampunkjunkies.net/www/track/console

Thats for entertaining my stupidity hehe :slight_smile:

perfect. glad you sorted it. I had very similar issues recently.