Jump to content

scheduling, running, and tracking scripts on auto pilot


ultrus

Recommended Posts

Hello,

I'm using php in combination with macros to keep things going on my personal computer like checking email, launching some stuff on startup, getting the latest blogs, sending me email notifications, etc. Currently this is all triggered manually, and I want to schedule tasks, and track the completed ones.

 

The challenge is, some of these macros will be scheduled at the same time, and I want things to be handled one at a time until caught up on tasks, then wait until its time to go at it again. Technical stuff aside, what are your thoughts on how to keep track of a waiting line of scripts, knowing when they are completed, and be aware of the next time the task is scheduled (scheduled weekly, daily, hourly, minutes, once only, etc.), without my interference?

 

Example thoughts:

One script is scheduled to run every day at 1:00pm.

Another script is scheduled to run every hour.

Another script is scheduled to run every 15 minutes.

Each scripts takes between 1-5 minutes to run.

At 1:00pm, all three scripts are scheduled to run at the same time, and are handled one at a time until complete

System knows to wait until 1:15pm to handle the next scheduled script, or add it to the cue when that time hits if scripts are still active

 

How is this possible? How does it keep track and reset itself for the next time?

 

Thanks in advance for the feedback :)

 

Note: I am aware of crons, but need a more dynamic solution because scripts take a while to run, and can't run at the same time.

Link to comment
Share on other sites

I got it figured out. I just needed caffeine! Basically, there's a script that adds tasks to a cue whenever it is time, that also checks when the last time that task was activated. The cue takes care of itself.

 

Alright. Time to wake up.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.