might pay for this if it's to much work.

Posted on 2012-09-03
Medium Priority
Last Modified: 2012-09-04
I am trying to make a pseudo cron job php script.

i found this site

but it write to a txt file how can i change it to write to a data base ?
Question by:armasmike
  • 3
  • 2
LVL 15

Expert Comment

by:Jagadishwor Dulal
ID: 38362537
What do you want to write in database the pseudo cron code or ???

Author Comment

ID: 38363507
I would like the code to not use a text file at all to store all the info and read the info from a db.
LVL 34

Expert Comment

ID: 38364360
greetings   armasmike, , I looked at the code for the pseudo-cron  job , that you gave a link to, and I do not nderstand your question, based on what this pseudo-cron is designed to do.
First, the pseudo-cron  does write to a text file as a "Log" recorder (maybe only in DEBUG mode). . It uses a rather bad way to record job "LastRun" time, by using a time modified on a "Job" file, not sure if it actually writes anything to that file. So the code that I looked at does not do any Data writes to a file, that I noticed.

What this does do, , is READ a text file, that has a list of PHP files that you want to run as cron jobs, and reads a date and time for the cron-job, and tests if the scheduled time, is in the past or future, if it is in the past, it calls -

the  $job[PC_CMD]  would be the PHP file name and Path , like -

If you are wanting to do a cron job list - READ - from a Database, instead of a file, it would require several many changes to the pseudo-cron code, and may take some effort, just working through this pseudo-cron code for and over view, took some time for me.
But as far as I can see, it uses a File to read the job list from, so you can set-up and change the cron jobs, by writing your cron job list to file , or change the cron job list file.
You may have a good reason to want a database read, but I can not think of any reason not to use the file read that this is set up to do.

ALSO, it is my opinion that this uses an Older PHP coding style, with alot of  GLOBAL variables, which these days are considered Bad PHP coding?
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.


Author Comment

ID: 38364526
Thank you for your input i am trying to make a plugin for a cms program. Wordpress has one build in called wp-cron.php. That users and set jobs to run with out having to use crontab in there cpanel.

This way the plugin can be install on a win server and still work. I am trying to find someone i pay or some free code that can be changed a bit for my plugin to work.

If you have time or if you know some one that does i would be willing to pay to get this done.
LVL 34

Accepted Solution

Slick812 earned 2000 total points
ID: 38365424
Sorry, I do not have time in the near future, to Redo this "pseudo cron job" code for a database, I would NOT want to use his code methods anyway. I would think that a "DataBase" use code might be tricky, because of the specific Table structure you would need to have in this May not be available in wordpress standard database tables, I can not see a "One Size Fits All" Table read write code as very possible for this kind of thing. I would think that someone would need to do alot of testing and error checking to make a successful WordPress Database Cron-Job plugin that works in different situations.

I do not know anyone that can do this at this time. There is a section in EE where you can hire an EE expert.

Author Closing Comment

ID: 38365593
Thank you i will look at hiring a EE expert

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, we’ll look at how to deploy ProxySQL.
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month16 days, 19 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question