I have a script that needs to be run daily. Should I use the Cron Job page in ISPCONFIG to do this, or do I need to add it manually on the server, or both? In order to test it, I added the following in ISPCONFIG (running at min intervals for testing purpose) : Code: */5 * * * * wget -q http://www.mydomain.com/cron.php Another question...should ISPCONFIG create a new file in /etc/cron.d for this new entry? I have seen that it does during other tests, but for some reason, it is no longer creating this file. I do not see any new entries in /var/log/ispconfig/cron.log, nor anywhere else, but I do see new entries in syslog. For example in syslog: Code: Jan 10 10:30:01 server2 /USR/SBIN/CRON[9529]: (web3) CMD (/var/www/clients/client1/web3wget -q http://www.mydomain.com/cron.php) With the particular script that is running (...cron.php), it should be generating a log file that I have created, but it is not, despite the appearance that it is being logged in syslog. Any insight? Thanks!
Update: I now see that a file has been created in /etc/cron.d: Code: MAILTO='' SHELL='/usr/sbin/jk_chrootsh' */5 * * * * web3 /var/www/clients/client1/web3wget -q http://www.mydomain.com/cron.php Does this look correct? Forgot to mention that the cron job still isn't being executed. And I have also tried: Code: */5 * * * * web3 /usr/bin/php /var/www/clients/client1/web3/web/cron.php
You have to use the full path to commands in cronjobs, as cron does not use the $PATH variable. So the correct command will be something like: /usr/bin/wget -q http://www.mydomain.com/cron.php
I do know that the syslog look to be giving the same entries (with the /usr/bin/wget this time), but I have not looked at the messages log. I don't have access to the system right now, but I'll take a look as soon as I get back...thanks for the help thus far!
A side note.... Webmin peacefully coexists with ISPConfig, both can be installed. I set my other cron jobs up in Webmin.
The cron entrys in the crontab files are fine, so ispconfig is working correctly here as this is all ispconfig has to do, the execution of the cronjob is a question of the operating system. have you tried to restart the cron daemon?
Is it a problem not having a space before the /usr/bin/wget? Code: */5 * * * * web3 /var/www/clients/client1/web3/usr/bin/wget -q http://www.mydomain.com/cron.php
You have to enter the full path to wget but you entered just wget and not /usr/bin/wget. The missing space above comes from that.
So, does this look correct then? Code: */5 * * * * web3 /var/www/clients/client1/web3 /usr/bin/wget -q http://www.mydomain.com/cron.php
Hmm... I deleted, then recreated the cron jobs (only 2) and they listed in the ISPConfig interface as expected. Then, a couple hours later, I went in to see if anything was working and noticed two things: 1. The file was not created in /etc/cron.d and 2. There were no longer any cron jobs listed in ISPConfig. So...I tried to recreate them once again and I get the following error: Code: Error 1. The maximum number of allowed cron jobs was reached.
This is strange... I went back to the ISPConfig cron jobs page a couple hours later and it is now populated, but the file still does not appear in /etc/cron.d. I have refreshed cache and still no luck.
I'm not sure, but shouldn't it read just Code: */5 * * * * web3 /usr/bin/wget -q http://www.mydomain.com/cron.php (without /var/www/clients/client1/web3)?
I recreated everything again and the file was finally created: Code: MAILTO='' SHELL='/usr/sbin/jk_chrootsh' */5 * * * * web3 /usr/bin/wget -q http://www.mydomain.com/cron.php ...and it still doesn't appear to be running.
You use a chroot enviroment in this cronjob. Are you sure that you installed wget into this path into the chroot?