I've read the answers to this question, but still don't understand what to do:
How to use my aliases in my crontab?
I am logged onto my Ubuntu server as root. I have the following command in my .profile:
alias test-alias="echo test"
I have the following command in my crontab file:
11 9 * * *      source /root/.profile; test-alias > /root/tmp.output 2>&1
When this command runs, the only output present in tmp.output is:
/bin/sh: 1: test-alias: not found
What am I doing wrong here? How can I use my test-alias in my crontab file? I want to use the alias directly in the command, I don't want to create additional scripts to run the alias.