Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

TNT Studio:
Easy way of sending scheduled tasks output to Slack
Jul 06, 2016 @ 16:20:12

On the TNT Studio site they've posted a tutorial showing you how to automate scheduled tasks and output to Slack, the popular online communication tool (think IRC for the web). They show how to use a simple webhook setup to relay the results of a task back to a given channel.

What many of us grow accustomed to is having cron job output emailed to us in order to see if everything went ok. Laravel's task scheduler also supports emailing output of the commands but if you are like millions of developers out there then you are probably using Slack and it's possible that it crossed your mind that it would be great if we could get output of the cron command sent to Slack. So let's do that.

They then walk you through the setup of the Slack notifier class to send the data to Slack via a Guzzle POSTed request. The next portion puts this code to work and creates the code to execute the command and return the results. The "after" event is then used to make the Slack request and output the results to the waiting channel.

tagged: output slack channel chat cronjob scheduled results output guzzle

Link: http://tnt.studio/blog/task-scheduling-output-to-slack

That Podcast:
Episode 6: The One Where We Didn't Even Get to Our Scheduled Topic
Aug 06, 2014 @ 17:57:10

In the latest episode of That Podcast, The One Where We Didn't Even Get to Our Scheduled Topic (episode #6), hosts Beau Simensen and Dave Marshall talk about a wide range of topics....except, apparently, the one they wanted to.

Some of the things (and people) mentioned in this latest show include:

You can listen to this latest episode either through the in-page player or by downloading the mp3 to listen whenever.

tagged: thatpodcast ep6 scheduled topic discussion

Link: http://thatpodcast.io/episodes/episode-6-the-one-where-we-didn-t-even-get-to-our-scheduled-topic/

DevShed.com:
PHP: Best Methods for Running Scheduled Jobs
Jun 28, 2012 @ 16:01:49

On DevShed.com today there's a new article posted looking at methods for running scheduled jobs based on responses to this forum post.

I have a webpage form that requires a date and time to be submitted. When it's submitted I need the back-end to run a script at the time and date specified. Have you ever needed to do something like this?

Some recommendations already posted include:

  • The UNIX "at" command
  • Setting up a queue system to manage the processes (using something similar to Gearman
  • Setting up a cron job to handle the periodic execution of the script.
tagged: execute scheduled job cron queue at unix opinion

Link:


Trending Topics: