Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 878991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:51:22+00:00 2026-05-15T11:51:22+00:00

I use PHP and Oracle, with crontab executing the PHP scripts at scheduled times.

  • 0

I use PHP and Oracle, with crontab executing the PHP scripts at scheduled times. My current logging/auditing solution involves simple log files. I’d like to save my cron execution logs to a database instead.

Right now I’m trying to design the process so that when a cron job starts I create a record in an CronExecution table. Then every time I want to log something for that cron I’ll put a record in a CronEvent table which will have a foreign key to the CronExecution table.

I plan to log all events using a PRAGMA AUTONOMOUS pl/sql procedure. With this procedure I will be able to log events inside of other pl/sql procedures and also from my PHP code in a consistent manner.

To make it more robust, my plan is to have a fallback to log errors to a file in the event that the database log calls fail.

Has anybody else written something similar? What suggestions do you have based on your experience?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T11:51:22+00:00Added an answer on May 15, 2026 at 11:51 am

    Yep, I’ve done this several times.

    The CronExecution table is a good idea. However, I don’t know that you really need to create the CronEvent table. Instead, just give yourself a “status” column and update that column.

    You’ll find that makes failing over to file much easier. As you build lots of these CronExecutions, you’ll probably have less interest in CronEvents and more interest in the full status of the execution.

    Wrap all of the update calls in stored procedures. You definitely have that correct.

    Including a ‘schedule’ in your CronExecution will prove handy. It’s very easy to have a lot of cron jobs and not be able to connect the dots on “how long did this take?” and “when is this supposed to run”. Including a “next scheduled run” on completion of a job will make your life much easier.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, I am trying to use OCI8 with PHP 5.3.x and Oracle 10g and
I use an Oracle database in a PHP application. A user tries to connect
We use Oracle and PHP together with some success. It seems there are a
Use PHP and Mysql. Fields in my table (product) are id , full_price ,
I use php to display a table of data drawn from my mysql database.
I use php with ajax. <?php /* * Suppose, user has entered both correct
I am trying to use PHP to fire hits at Google to track newsletter
I am trying to use PHP Curl to make the registrations of https://www3.gotomeeting.com/register/432624022 automatic.
I need to do use php/regex to replace this: {{image-4-m}} to this: <img src=4.jpg
I can't use PHP in my HTML pages. For example, index.html . I've tried

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.