Tag Archives: cron

Auto deploy from BitBucket repository via Cron

Setup the environment

Create the environment for Apache

Create ssh key in /home/deployment/.ssh/id_rsa

Create wrapper for git to auth via SSH keys

Run the fist clone

Test the Re-Base

Make sure to get into the folder with .git subfolder
(in this case we did the clone into /var/www/vhosts/ BUT the code is stored into a new subfolder pulled with the domain name. So we cd into that one)

Install the CRON

Scheduled unattended tasks – at

Ends using CTRL+D that generates the <EOT> bit.

Source: http://www.computerhope.com/unix/uat.htm

Check the processes in the queue

Check content of a job

Delete job

Also, you can cat/modify the job in /var/spool/cron/atjobs/ or /var/spool/at (in Centos)

If not installed, on Centos, make sure to start also ‘atd‘ service.