#!/bin/bash

# Give execution rights on the cron job
chmod 0644 /etc/cron.d/my-crontab

# Apply cron job
crontab /etc/cron.d/my-crontab

# Create the log file
touch /var/log/cron.log

# Start cron in the foreground and log to cron.log
cron && tail -f /var/log/cron.log
