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

  • Home
  • SEARCH
  • 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

Ask A Question

Stats

  • Questions 545k
  • Answers 545k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I would advise against using the backspace key, since that… May 17, 2026 at 9:02 am
  • Editorial Team
    Editorial Team added an answer (Note: I'll assume that by "decode and dispatch" you mean… May 17, 2026 at 9:02 am
  • Editorial Team
    Editorial Team added an answer Non static properties (alias fields, alias member variables) have their… May 17, 2026 at 9:01 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm looking for good/working/simple to use PHP code for parsing raw email into parts.
I want to use the php simple HTML DOM parser to grab the image,
I use PHP with CodeIgniter(MVC framework). My Question is fairly simple. What according to
Is it possible to use PHP's SimpleXML functions to create an XML object from
At the moment I use PHP for almost everything I develop for the Web
I want to use php in console mode and create an environment to test
I'd love to use PHP variables in my CSS files but I don't want
Why would I want to use PHP's filter library? Why wouldn't I? It seems
I'd like to be able to use php search an array (or better yet,
Currently I know of only two ways to cache data (I use PHP but

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.