Power Cron's installation procedure is fast and simple, thanks to its script. It takes less than 5 minutes per server. You can launch it again in case of problems or to update Power Cron.
It has been carefully validated on the following systems:
Power Cron requires the tools Jq, which allows it to process JSON data streams; and Curl, which allows it to download its latest version and contact its server.
Before installing Power Cron on a server, you must ensure that the system is up to date:
$ sudo apt-get update && sudo apt-get upgrade
Then install the dependencies:
$ sudo apt-get install jq curl
Before installing Power Cron on a server, you must ensure that the system is up to date:
$ sudo yum clean all && sudo yum update
Then install the dependencies:
$ sudo yum install jq curl
Jq has no dependencies. When not available on your distribution's repositories, you can use one of the pre-compiled version that we put on our servers:
$ curl http://get.pcron.eu/jq-1.5-64 -o jq $ chmod +x jq $ sudo mv jq /usr/bin/
You will have to choose between jq-1.5-32
and jq-1.5-64
, depending on your architecture being 32 bits
or 64 bits.
On some architectures, such as the Raspberry Pi, you will have to compile Jq from source.
We advise you to consult the script before running it on your servers.
$ curl http://get.pcron.eu -o install $ sudo bash install
The installation takes place in three stages :
The installation script will download the latest version of Power Cron wrapper and install it in /usr/bin/powercron
.
You can also take a look at the wrapper before installing it on your servers.
The installation script will configure the wrapper by asking you some questions. If a previous configuration exists, its values will be loaded by default. The installation script was designed both to install Power Cron, and to update it.
1/3: Please enter your email address [] :
Enter the email address with which you registered to Power Cron. There is no default value.
The email address will allow the Power Cron server to link your server to your account when it is created. Thereafter, it will allow it to secure your jobs, in conjunction with the IP address of the request.
2/3: Please enter the host name [] :
Enter the name of the host on which you install Power Cron. This is the name by which you will later recognize the server among all your
saved servers. The default is the result of the hostname -f
command.
Once these informations given, the script will detect the path of commands it needs to run (Grep, Sed, Curl, Jq, Time), and save everything
in its configuration file (/etc/powercron.conf
).
We wrote a Cron jobs migration script to save you time during installation of Power Cron.
This script, based on Cron good practices, will offer to convert existing jobs in folders /etc/cron.hourly
, /etc/cron.daily
,
/etc/cron.weekly
and /etc/cron.monthly
to classic jobs, called from Power Cron's crontab. These jobs will be moved
to the /etc/powercron/
folder and prefixed with their periodicity.
A new crontab will be created in the /etc/cron.d/powercron
file. It will contain all migrated jobs, which will now be called
by the Power Cron wrapper.
The start time of daily, weekly and monthly jobs will be prompted. The default is 3am. The jobs will initially be programmed by minute, in alphabetical order, from that hour.
3/3: Please enter the starting hour for daily, weekly and monthly jobs [3] :
We don't recommend you to schedule jobs between midnight and 3am. When a server is subject to the summer and winter hours, the time change is done during this time range, and every job scheduled in between will simply be ignored on the concerned days. Already started jobs are held normally. On our side, we will use this time period for maintenance.
Once installation is complete, be sure to read and eventually correct Power Cron's crontab. You can also add any job that was not present in the migrated files by the script. It may be optimized subsequently, thanks to new information you can get from your dashboard.
Finally, you can reload the cron
service so that it can recognize these changes:
$ sudo service cron reload