Crontab - Send Mail on Restart

I am trying to send an email when starting my machine with crontab.

@reboot (cd /home/untitle/lab/php/initmail/ && ./initmail)
@reboot mkdir /home/untitle/testcrontab

With this configuration, the folder is created but no email is sent, the initmail script works perfectly.

I am using php for sending email, the initmail script just run the command

#!/bin/bash

php /home/untitle/lab/php/initmail/initmail.php

I also have the symbolic link present in the init.d folder but none sends.

Thanks in advance

2
James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article