#1  
Old 3rd May 2012, 01:06
planetcaravan planetcaravan is offline
Member
 
Join Date: May 2011
Posts: 35
Thanks: 2
Thanked 1 Time in 1 Post
Default Cronjob won't work

Hi,

I'm using ISP Config 3.0.4.4 on Debian Squeeze/Sid.
I've setup a script an put it in:
Code:
/var/www/clients/client6/mydomain.tld/backup
Here is the script:
Code:
#!/bin/bash
NOW=$(date +"%m-%d-%Y %T")
echo -e "File di testo creato: "$NOW >> /var/www/mydomain.tld/backup/log_test.txt
Here is it what I have in my folder:
Code:
-rwxrwxrwx  1 web17 client6   84 May  3 00:27 log_test.txt
-rwxrwxrwx  1 web17 client6  126 May  3 00:25 script.sh
I've setup cronjobs via ISP Config (file attached)

I'm having this log:
Code:
PHP Warning:  mkdir(): File exists in /usr/local/ispconfig/server/plugins-available/cron_jailkit_plugin.inc.php on line 293
I can't see it via crontab -l
What's wrong?
Attached Images
 
Reply With Quote
Sponsored Links
  #2  
Old 3rd May 2012, 14:44
dclardy dclardy is offline
Senior Member
 
Join Date: Sep 2009
Location: Dallas, TX
Posts: 347
Thanks: 10
Thanked 47 Times in 28 Posts
Default

Did you chmod +x the script?
Reply With Quote
  #3  
Old 3rd May 2012, 15:21
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,754
Thanks: 821
Thanked 5,331 Times in 4,183 Posts
Default

I guess the problem is the script, it is run in a chroot, so the path /var/www/mydomain.tld/ is / from inside the script, so the line:

echo -e "File di testo creato: "$NOW >> /var/www/mydomain.tld/backup/log_test.txt

has to be:

echo -e "File di testo creato: "$NOW >> /backup/log_test.txt
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 4th May 2012, 00:19
planetcaravan planetcaravan is offline
Member
 
Join Date: May 2011
Posts: 35
Thanks: 2
Thanked 1 Time in 1 Post
Default

Hi and thanks for you answers.

I've modified the script.

Now I'm having on syslog:
Code:
May  4 00:16:01 vps01 /USR/SBIN/CRON[2697]: (web17) CMD (/var/www/mydomain.tld/backup/script.sh^I#mydomain.tld)
May  4 00:16:01 vps01 /USR/SBIN/CRON[2690]: (CRON) error (grandchild #2697 failed with exit status 127)
May  4 00:17:01 vps01 /USR/SBIN/CRON[2705]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
I'm also having this in: /var/log/ispconfig/cron.log


Code:
PHP Warning:  mkdir(): File exists in /usr/local/ispconfig/server/plugins-available/cron_jailkit_plugin.inc.php on line 293

Last edited by planetcaravan; 4th May 2012 at 00:25. Reason: Add a detail
Reply With Quote
  #5  
Old 4th May 2012, 09:48
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,754
Thanks: 821
Thanked 5,331 Times in 4,183 Posts
Default

And the xcript is working when you execute it manually on the shell?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 5th May 2012, 16:57
planetcaravan planetcaravan is offline
Member
 
Join Date: May 2011
Posts: 35
Thanks: 2
Thanked 1 Time in 1 Post
Default

Yes it works!
Reply With Quote
  #7  
Old 8th May 2012, 10:56
planetcaravan planetcaravan is offline
Member
 
Join Date: May 2011
Posts: 35
Thanks: 2
Thanked 1 Time in 1 Post
 
Default

Can somebody help me, please?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting PHP to work with Cherokee maineac Installation/Configuration 3 2nd November 2010 05:31
How to config Proftpd to work with passive mode in ISPConfig 2.2.35 X-admin Installation/Configuration 0 6th June 2010 18:52
Email alias and forward do not work in ISPConfig 3 alecksievici Installation/Configuration 2 11th May 2010 15:12
Pure domain DNS doesn't work SyRenity Installation/Configuration 7 12th December 2006 12:12
Cant get any messenger program to work SimplyMepis 6.0 gtoman Technical 1 13th November 2006 15:26


All times are GMT +2. The time now is 19:21.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.