Jump to content

"Automation Hooks" make life easier


wbmnfktr
 Share

Recommended Posts

Based on my recent post and your answers in Module: ProcessWire Core Upgrade I decided to no longer hijack that thread and therefore open this one.

@bernhard asked some very good questions there and here are some of my answers.

First and foremost, I keep all of my "Automation Hooks" at /site/ready.php, and they are not present in all of my projects. I mostly utilize them in larger long-term projects and projects in which I have devoted a significant amount of effort - see samples below.

I considered building a module for each project so that I could keep it around, fork it, alter it... that kind of dev approach. But that didn't work out as expected, so everything was moved back to ready.php - which actually works best for me. One file in plain sight, right next to everything else.

For these activities, I have my own collection of snippets. I simply grab the appropriate snippet, tweak it, position it, test it, and proceed from there. No overly complicated workflow at all.

But why should I care if there are any module changes (see thread above) if I'm not going to update them right away?

I'm curious about what's going on in each project. I can see which modules were installed, which are in use, and which may be upgraded the next time there is a release. I rarely update modules or anything else outside of my development environment. I learned my lessons here.

This isn't something I'd use in a project in which 99% of the code consists of echo/foreach like in some smaller sites I built. I honestly don't care because their code base and modules will almost certainly never be touched again.


Projects like these are a totally different thing - some of those "Automation Hooks" are in place there:

What things I "automate" and have in place across my projects - to give you an idea why this makes my life easier.  

  • Checking for news updates (weekly)
    No updates in the last 2 weeks? Remind the client to say something on their website and suggest doing so on social media, Google Business, and everywhere else too. 
  • Checking event count (weekly)
    Only 3 events left? Tell the client to check this and update the event pages or at least post something in the news to tell visitors what's going on. 
  • Checking newsletters (weekly)
    No newsletter in the last 2 weeks? You get the deal: the client will be notified to either send a newsletter or hand out content so someone else can do this 
  • Checking lunch deals (daily)
    Same as above. A restaurant runs out of lunch deals and will be notified via email right away. 
  • Archive old stuff (weekly)
    Short term content, like lunch deals, don't have to stay in there until the end of days. Archive them under another branch of pages, delete/trash them. Out of sight, out of mind. 
  • Checking for TODOs (weekly)
    This is a special one as I sometimes like to add a notes field to content pages in which I can write down things I need to do on that specific page in a project. I look for all pages having content in this field, put everything in a mail and go from there. It's something like a TODO app but direct in the project. No Jira, Asana, Todoist needed for this.
    pwwfhk.png.b0501d558cbd7e7453527e8a0a471c86.png

There are plenty other options available. In my situation, it varies depending on the specialty, the project's budget for maintenance, or the overall scope of my tasks. I typically utilize these "Automation Hooks" to learn more about a project and remain informed.

Sometimes it's for the client, but it's all automated. There have been projects performing comparable automated tasks for over a year now or more, and the customer is thrilled to receive an email every now and then with a list of things he should do. WINNER WINNER! I get paid to remind him, and he gets things done.

You could put anything you wanted in those. File counts, database size, login errors, PHP version, PW version, and so on. 

 

Ping at @flydev @monollonom @horst

  • Like 5
  • Thanks 1
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...