1

i been trying to make a script,that generates a programmed backup using external values to fill the crontab line.
so i been using :

read -p " text " var
for every variable for the crontab 
to get the values but i cant find a way to get does values in crontab. 

can anyone help?

  • 1
    If your backup runs daily, create a normal script and place it in /etc/cron.daily and don't mess with crontab at all. Here is my daily backup: https://askubuntu.com/questions/917562/backup-linux-configuration-scripts-and-documents-to-gmail/922493#922493 – WinEunuuchs2Unix Nov 05 '18 at 15:27
  • it does't need to run daily, it runs only when the opcion is selected (using a menu), i solved the problem using: crontab * $var * * * command – Nataniel Gigena Nov 05 '18 at 16:32

0 Answers0