I'm trying to use variables in my cron.tab file to keep it a little neater. Here's how I'm setting my variables:
SET source1="c:\docs"
This works great. But what if I have a phrase that I'd like to put in my variable that requires quotes? For example, I'd like to put this phrase into a variable:
-ax h -ax s -c -log \\192.168.1.240\share\backup_logs\backup_log_c.txt -v -ra "c:\python24\python.exe \\192.168.1.240\backups\scripts\post-backup_c.py"
Note the -ra (aka command executed after completion), where I need the full path to the python interpreter, followed by the script name. I've tried putting that into a variable, but it crashes cron every time. It works fine when I enter that manually, outside of a variable.
Here's what I've tried:
SET commands1="-ax h -ax s -c -log \\192.168.1.240\share\backup_logs\backup_log_c.txt -v -ra \"c:\python24\python.exe \\192.168.1.240\backups\scripts\post-backup_c.py\""
SET commands1="-ax h -ax s -c -log \\192.168.1.240\share\backup_logs\backup_log_c.txt -v -ra 'c:\python24\python.exe \\192.168.1.240\backups\scripts\post-backup_c.py'"
SET commands1="-ax h -ax s -c -log \\192.168.1.240\share\backup_logs\backup_log_c.txt -v -ra c:\python24\python.exe \\192.168.1.240\backups\scripts\post-backup_c.py"
None of the above work.
Is there a way to do this?