Skip to main content
Correct file name
Source Link
mmmmmm
  • 31k
  • 18
  • 94
  • 158

As noted in the other answerother answer the error is because you are trying to run a GUI app when not logged in.

However in your case why are you using a GUI app (Terminal ) here.

Just call your scripts directly from the cron script.

e.g. daily/.sh should be

#!/bin/bash
~/backupThing1.sh
~/dailyThing2.sh

Note that you might need to have absolute paths not ~ here as cron jobs do not have the same environment as when run in the terminal.

As noted in the other answer the error is because you are trying to run a GUI app when not logged in.

However in your case why are you using a GUI app (Terminal ) here.

Just call your scripts directly from the cron script.

e.g. daily/sh should be

#!/bin/bash
~/backupThing1.sh
~/dailyThing2.sh

Note that you might need to have absolute paths not ~ here as cron jobs do not have the same environment as when run in the terminal.

As noted in the other answer the error is because you are trying to run a GUI app when not logged in.

However in your case why are you using a GUI app (Terminal ) here.

Just call your scripts directly from the cron script.

e.g. daily.sh should be

#!/bin/bash
~/backupThing1.sh
~/dailyThing2.sh

Note that you might need to have absolute paths not ~ here as cron jobs do not have the same environment as when run in the terminal.

Source Link
mmmmmm
  • 31k
  • 18
  • 94
  • 158

As noted in the other answer the error is because you are trying to run a GUI app when not logged in.

However in your case why are you using a GUI app (Terminal ) here.

Just call your scripts directly from the cron script.

e.g. daily/sh should be

#!/bin/bash
~/backupThing1.sh
~/dailyThing2.sh

Note that you might need to have absolute paths not ~ here as cron jobs do not have the same environment as when run in the terminal.