Skip to content

Instantly share code, notes, and snippets.

@bencooling
Last active August 29, 2015 14:21
Show Gist options
  • Save bencooling/ef53cb1cb8208ee58bfc to your computer and use it in GitHub Desktop.
Save bencooling/ef53cb1cb8208ee58bfc to your computer and use it in GitHub Desktop.
Ubuntu Upstart Job Configuration
# /etc/init/testjob.conf
# Two basic stanzas that define purpose of job script and who created it
description "A test job file for experimenting with Upstart"
author "Ben Cooling"
# Run after system services and processes have already loaded (to prevent any conflict)
start on runlevel [2345]
exec echo Test Job ran at `date` >> /var/log/testjob.log
# Run this command to check sytax
# init-checkconf /etc/init/testjob.conf
# sudo service testjob start
# cat /var/log/testjob.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment