Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Jul 2006
    Location
    Staffordshire, England
    Posts
    16

    Default Help with cron jobs

    Hi All

    I have written a script to use with the cron to backup mysql databases.

    Problem is when the script runs i get a e-mail to say it cant find the location of what i am trying to run, i have checked with my web provider and the path is :

    /home/USERNAME/

    so in the command i am doing

    bash /home/USERNAME/public_html/backup.sh

    The backup.sh is in the public_html dir.

    But it wont find it when that is that path, what am i doing wrong ? missing the obvious i guess but what ?

    Thanks

  2. #2
    Member
    Join Date
    Apr 2003
    Posts
    479

    Default

    Looks ok. What's the exact error you get?

    Edit: It might not know where bash is. Put the full path to bash in the cron, or just put #!/path/to/bash at the top of the script, chmod u+x it, and execute it directly.
    Last edited by elleryjh; 07-21-2006 at 01:56 PM.

  3. #3
    Member
    Join Date
    Jul 2006
    Location
    Staffordshire, England
    Posts
    16

    Default

    The error in the e-mail is :

    /bin/sh: line 1: /home/USERNAME/public_html/backupsql.sh: No such file or directory

    Note : please ignore the fact that i called it backup.sh that was a typo in previous post, its backupsql.sh
    Last edited by systemtek; 07-21-2006 at 02:52 PM.

Similar Threads & Tags
Similar threads

  1. Cron Jobs
    By tech6 in forum New User Questions
    Replies: 2
    Last Post: 10-10-2010, 11:06 PM
  2. Where are cron jobs?
    By Daerious in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 03-08-2009, 01:47 AM
  3. Cron jobs
    By DigiCrime in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 08-04-2005, 02:47 AM
  4. Cron Jobs
    By TitaniumHosting in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 02-01-2005, 08:47 PM
  5. cPanel cron jobs or cron.daily , cron.hourly , etc.?
    By spaceman in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 01-01-2004, 07:16 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube