Improve LinkedIn UI and scheduling robustness
- When LinkedIn is connected, replace the Connect button with a pencil (test post to first personal profile) and a reconnect arrow icon - Add Process Now button to the Schedule tab that shells out to the cron script on demand and shows its output inline - Add flock() to the cron script to prevent overlapping runs - Fix cron install path comment to match deployed location Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
30b21b6214
commit
45b9e15152
5 changed files with 66 additions and 7 deletions
|
|
@ -2,13 +2,17 @@
|
|||
/**
|
||||
* Cron-driven scheduled social post processor.
|
||||
*
|
||||
* Install once on the host (as the apache user):
|
||||
* * * * * * /usr/bin/php /opt/hackmancms/bin/process-scheduled-posts.php >> /var/log/hackman_scheduled_posts.log 2>&1
|
||||
* Install once on the host (as root, in /etc/cron.d/hackmancms):
|
||||
* * * * * * www-data /usr/bin/php /var/www/html/hackmancms/bin/process-scheduled-posts.php >> /var/log/hackman_scheduled_posts.log 2>&1
|
||||
*/
|
||||
|
||||
define('ROOT', dirname(__DIR__));
|
||||
require ROOT . '/lib/bootstrap.php';
|
||||
|
||||
// Prevent overlapping runs
|
||||
$_lock_fp = fopen(sys_get_temp_dir() . '/hackman_schedule.lock', 'c');
|
||||
if (!$_lock_fp || !flock($_lock_fp, LOCK_EX | LOCK_NB)) exit(0);
|
||||
|
||||
$now = gmdate('Y-m-d H:i:s');
|
||||
|
||||
// Load all due pending targets grouped by post
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue