Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 3rd March 2013, 08:28
manarak manarak is offline
Senior Member
 
Join Date: Apr 2009
Posts: 262
Thanks: 32
Thanked 6 Times in 5 Posts
Default How to setup a cron job to execute a shell script?

I have successfully setup several cron jobs with URL cron, which seems to be working, but as far as of now, I still couldn't get shellscripts setup properly.
I assume there are some permissions issues, but I'm unable to resolve them myself.

Can someone please review how my server is installed and what I want to achieve and then tell me how to proceed?

Server:
Debian 6 (installed as per Falko's perfect server How-To)
with Jailkit installed (I believe this is relevant)
ISPConfig upgraded to 3.0.5.1

What I want to achieve:
let's assume I got a directory /var/www/clients/client1/web1/cron/ where scripts that should be executed via CRON are stored

let's assume I got script1.php and script2.sh

Question 1:
how do I properly setup a cron job in ISPConfig3 interface to execute script1.php located at
/var/www/clients/client1/web1/cron/script1.php
?
(I do not wish the script to be reachable by http: )

Question 2:
let's assume script1.sh has to perform some tasks in some special directory such as
/var/vmail/mailfilters/domain.com/ to modify some files there.
Same question, how do I setup the CRON job in ISPConfig3 interface?

Thank you very much
Reply With Quote
Sponsored Links
  #2  
Old 4th March 2013, 18:15
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
 
Default

Quote:
Originally Posted by manarak View Post
Question 1:
how do I properly setup a cron job in ISPConfig3 interface to execute script1.php located at
/var/www/clients/client1/web1/cron/script1.php
?
(I do not wish the script to be reachable by http: )
Code:
/path/to/php /var/www/clients/client1/web1/cron/script1.php
Quote:
Originally Posted by manarak View Post
Question 2:
let's assume script1.sh has to perform some tasks in some special directory such as
/var/vmail/mailfilters/domain.com/ to modify some files there.
Same question, how do I setup the CRON job in ISPConfig3 interface?
Make sure script1.sh is executable. Specify the path to the script in the cron job:
Code:
/path/to/script1.sh
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
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
Cannot login to phpmyadmin penkku HOWTO-Related Questions 1 24th February 2011 09:26
Problem getting cron job to run and in need of help :) MrCompTech General 7 27th July 2010 09:50
webalizer cron job not running bolero Installation/Configuration 2 2nd June 2009 13:09
Shell Script Execution Problem giganet Programming/Scripts 1 23rd December 2008 15:04
Shell script is broken... Duplex Installation/Configuration 4 16th January 2006 09:55


All times are GMT +2. The time now is 06:50.


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