I have a web application that I am trying to upgrade. Part of their upgrade process involves using a migration tool to transfer data from one version to another. This tool relies on cronjobs for it to function.
According to them, the migration is not working because my cronjobs are not working properly.
Is there a way to verify this?
Below is what I had to paste in my crontab:
- cd /srv/www/whiterhino/d7/periodic; /usr/bin/php -q cron.php
-----BEGIN PGP SIGNED MESSAGE-----
sudo tail -f /var/log/messages
Watch for any output talking about cron, so I guess you could refine that:
sudo tail -f /var/log/messages | grep -i cron
On 09/06/2010 06:36 PM, abacabb wrote:
> I have a web application that I am trying to upgrade. Part of their
> upgrade process involves using a migration tool to transfer data from
> one version to another. This tool relies on cronjobs for it to
> According to them, the migration is not working because my cronjobs are
> not working properly.
> Is there a way to verify this?
> Below is what I had to paste in my crontab:
> * * * * * cd /srv/www/whiterhino/d7/periodic; /usr/bin/php -q cron.php
> Any ideas?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
You say "“my crontab” which is not very precise. Normaly this means that you area normal user (not root) and that you put this in your crontab using
But some people say "my crontab’ meaning e.g. root’s crontab, or /etc/crontab.
Just an idea, you could add
; echo "this is cron"
(or a more usefull outcry) to your cron entry, thus forcing a mail to email@example.com (I assume that normaly the running does not generate any output to standard out and thus you are wondering if it works).
Another solution is to log the output directly to a file:
- cd /srv/www/whiterhino/d7/periodic; /usr/bin/php -q cron.php >> /var/log/mylogfile.log 2>&1
In that case you’ll see the content in the file /var/log/mylogfile.log (you need to have write permissions there).
I would change that into:
* * * * * cd /srv/www/whiterhino/d7/periodic; /usr/bin/php -q cron.php ; echo "cron.php run at $(date)" >>/tmp/mylogfile 2>&1
then. No intermingling of the “real” output with the “test” output and no need to give write access into a typical “system” place to a normal user.
But beware: this seems to be run at every minute, thus mylogfile can grow and fill your root partition when you leave the test output adding there for months lol!