Results 1 to 5 of 5

Thread: CRON Error retrieval

  1. #1
    Join Date
    Apr 2011
    Beans
    4

    CRON Error retrieval

    I am new to Ubuntu and confused.
    I want to setup a simple cron job and I see that I am getting errors but I may not see the content of the error because I have no mail transport installed?
    Surely there is no requirement that I setup a mail server and a mail client so that I can see why my cron job is failing?
    Is there no way to simply redirect the error to a place where I can read the error message?

    Jack

  2. #2
    Join Date
    Apr 2012
    Beans
    7,256

    Re: CRON Error retrieval

    Have you tried simply redirecting the command(s) standard output and/or standard error to a file?

    Code:
    * * * * * /path/to/some/command >> /path/to/some/logfile 2>&1

  3. #3
    Join Date
    Jul 2009
    Beans
    384

    Re: CRON Error retrieval

    Hello, This should help you. . https://ubuntuforums.org/showthread.php?t=2346322

  4. #4
    Join Date
    Apr 2011
    Beans
    4

    Re: CRON Error retrieval

    Yes, I have tried this,
    * * * * * /path/to/some/command >> /path/to/some/logfile 2>&1

    The problem is fixed.
    The php page that I was trying to execute now executes and updates the database.

    THANK YOU
    Last edited by j-a-c-k; December 13th, 2016 at 11:04 PM.

  5. #5
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: CRON Error retrieval

    Great! Please mark as SOLVED from the Thread Tools menu up-top if this is now solved to your satisfaction. It is a great help to users searching the forum.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •