using 'at' in startup script

I’m trying to run something like : echo “/etc/init.d/postfix restart” | /usr/bin/at now + 5 minutes : in a startup script.

It is adding the entry to /var/spool/atjobs but never actually processing the file even thought atd is started up at boot.

The exact same thing works from the command line.

Thanks for any suggestions.

Thanks,
Matt

On 09/15/2016 08:34 AM, skunkboy wrote:[color=blue]

I’m trying to run something like : echo “/etc/init.d/postfix restart” |
/usr/bin/at now + 5 minutes : in a startup script.

It is adding the entry to /var/spool/atjobs but never actually
processing the file even thought atd is started up at boot.

The exact same thing works from the command line.[/color]

Odd, this is; have you tried comparing the atjobs files to see if/how they
differ when created the different ways? I presume the successful job was
created as ‘root’ as well. Also, does restarting atd show anything
interesting? Any errors in log files (/var/log/*)?


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…

Hardware clock was set 10 hours in the future, and during startup everything was being done in the future… :slight_smile:

Fixed this and this seems to have addressed the issue.

Great to hear; thanks for posting back your results.


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…