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

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Your edit has prior information, the bit that states "counter… May 16, 2026 at 6:57 pm
  • Editorial Team
    Editorial Team added an answer Should I be using word boundaries like \b? Yes, you… May 16, 2026 at 6:57 pm
  • Editorial Team
    Editorial Team added an answer My provocative answer will be that you should try to… May 16, 2026 at 6:57 pm

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 have a PHP application using an Oracle XE database. Whenever I add a
I use PHP and I want to know if there's a free web service
Is it possible to use PHP alternate syntax (as described in the CodeIgniter user
I want to use php array for HTML select list. In this case it
I am trying to use PHP preg_math parse a string that looks like: 6.15608128
Anyone know of a FREE and easy to use PHP MySQL Datagrid class? I
I'm new to the Oracle Platform (having primarily used MySQL, with a little Postgres
I am currently working on 2 web servers, One Coldfusion and the other PHP.
Hi I am trying to store names into an Oracle database and fetch them
For a governmental agency, we build a release management system developped in PHP and

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.