Monday, March 14, 2022

[SOLVED] run a cron job only once

Issue

Hi I have to restart Apache from rails controller I tried to do that with %x{} and system commands but it fails so I decided to do it with cron Is it possible to make cron task that will be executed only once ?


Solution

The run once version of cron is called at. See http://en.wikipedia.org/wiki/At_%28Unix%29 for an explanation, and note that specifying "now" as the time causes it to run immediately.



Answered By - btilly
Answer Checked By - Senaida (WPSolving Volunteer)