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
|
|
@ -103,6 +103,15 @@ if ($action === 'delete') {
|
|||
exit;
|
||||
}
|
||||
|
||||
// ── RUN NOW ───────────────────────────────────────────────────────────────────
|
||||
if ($action === 'run_now') {
|
||||
$script = ROOT . '/bin/process-scheduled-posts.php';
|
||||
if (!file_exists($script)) { echo json_encode(['error' => 'Cron script not found']); exit; }
|
||||
$output = shell_exec('/usr/bin/php ' . escapeshellarg($script) . ' 2>&1');
|
||||
echo json_encode(['ok' => true, 'output' => $output ?? '(no output)']);
|
||||
exit;
|
||||
}
|
||||
|
||||
// ── RETRY FAILED TARGET ───────────────────────────────────────────────────────
|
||||
if ($action === 'retry_target') {
|
||||
$target_id = (int)($input['target_id'] ?? 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue