I've tried to set a cron job in "crontab -e":
* * * * * /usr/bin/php /home/vagrant/Code/xxx/testCron.php
testCron.php file creates another file, it contains only this:
<?php
$f = fopen('cron-' . date('H-i-s') . '.txt', 'w+');
fwrite($f, 'asdf');
fclose($f);
But the file cron-....txt doesn't appear. Were can be a problem?
I did/checked this:
- Cron is working. I checked this with sudo "service cron start" commad.
- the $PATH contains "/home/vagrant/.composer/vendor/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
testCron.php
– frz3993