Closed Thread
Results 1 to 3 of 3

Thread: STOLI - cron jobs and mail()

  1. #1
    cybrax's Avatar
    cybrax is offline x10 Elder cybrax is on a distinguished road
    Join Date
    Aug 2009
    Location
    UK
    Posts
    699

    STOLI - cron jobs and mail()

    Hi guys,

    am tinkering with a database and log file backup script and it's behaving oddly.

    The script runs fine manually, extracting sql data and selected folder files and sending them as an email with attached folder containing the zipped data ...

    at least it is to yahoo but not a gmail address (did say it was odd) was wondering if you can see any errors bouncing back from gmail?

    As for the Cron job, it's set to every ten minutes for setup/testing but does not appear to be triggering. I don't set these up very often and can never recall if there is supposed to be a space between eg: php /cybrax or just php/cybrax

    0,10 * * * * /usr/bin/php /home/cybrax/public_html/backup.php
    Probably something I've done wrong this end, so any suggestions welcome.

    ---------- Post added at 01:55 AM ---------- Previous post was at 01:31 AM ----------

    tweeked some of the script settings and trying again
    The code must flow.
    Project 157: Latest UK Jobs direct to your mobile phone
    New Domain under construction: Lovelogic.net
    home for some new projects that we can't keep here ;)


  2. #2
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,635

    Re: STOLI - cron jobs and mail()

    A command line like:

    Code:
    /usr/bin/php /home/igor/public_html/mail_test.php >>/home/igor/public_html/mail_test_log.txt 2>&1
    will log any output (ie echo) and any error messages (even system errors).

    I have a feeling you might see:

    Code:
    Can't do setuid (cannot exec sperl)
    if you are using PHP mail(). For some reason mail() will not work under cron (the script runs as a different user than when you run the script from the Web).
    Nothing is always absolutely so.

  3. #3
    cybrax's Avatar
    cybrax is offline x10 Elder cybrax is on a distinguished road
    Join Date
    Aug 2009
    Location
    UK
    Posts
    699

    Re: STOLI - cron jobs and mail()

    cron is ok now - jst waiting on email to arrive at yahoo - delay is around twenty minutes

    ok will add the error log to command and see what I get

    ---------- Post added at 02:26 AM ---------- Previous post was at 02:08 AM ----------

    Thanks Descalzo,

    will look at changing script to use SMTP mail alternative

    ---------- Post added at 03:29 AM ---------- Previous post was at 02:26 AM ----------

    gaaagh.... cron permissions

    SMTP Error: Could not connect to SMTP host.
    Mailer Error: SMTP Error: Could not connect to SMTP host.

    oh well, got a couple of other ideas will try them later tomorrow
    Last edited by cybrax; 03-10-2011 at 08:10 PM.
    The code must flow.
    Project 157: Latest UK Jobs direct to your mobile phone
    New Domain under construction: Lovelogic.net
    home for some new projects that we can't keep here ;)


Closed Thread

Similar Threads

  1. Cron Jobs on Stoli Server not Working
    By greeffq in forum Free Hosting
    Replies: 4
    Last Post: 01-09-2011, 09:38 AM
  2. Cron Jobs
    By gameserv15 in forum Free Hosting
    Replies: 1
    Last Post: 06-26-2010, 03:14 AM
  3. Cron Jobs
    By streetlifehelp56 in forum Free Hosting
    Replies: 2
    Last Post: 06-08-2010, 02:32 PM
  4. CRON jobs on Stoli
    By tana21 in forum Free Hosting
    Replies: 4
    Last Post: 01-27-2010, 07:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers