2

I have a calc spreadsheet that I'm trying to automate. When open, it collects data, calculates, saves itself and exits.

So I created a script to call this.

soffice --calc --norestore Updater.ods

If I run the script ./updater.sh calc opens and does what its supposed to do :)

However, when I put it in crontab or fcrontab

00     15     *     *     *       export DISPLAY=:0 && /path/updater.sh

I can see the process is running, but it doesn't complete any of the actions that it would if the GUI opened. And running the script from terminal opens the gui, but with cron the gui is not opened. So I'm wondering if it is possible to open an app (and it's gui) with cron or another scheduler?

Any help would be appreciated.

1

Try without the &&

00 15 * * * export DISPLAY=:0 /path/updater.sh

I hope this helps

  • 1
    You shouldn't have export either, if you remove &&. – muru Apr 15 '16 at 16:07
  • 1
    It worked using the following: (no export or &&) 00 15 * * * DISPLAY=:0 /path/updater.sh – Les Apr 15 '16 at 18:25
0

There is another option, to schedule graphic tasks, to.

In Orage, the calendar app (double click on the clock in the system panel), doubleclick on a single day.

Select a event, new. Give it a name, here maybe 'updater'. Set the time to 15:00.

Now choose tab: Reminder, Application, use: /path/updater.sh Deactivate sound and other unsound options.

Now choose tab: Repetition, Frequency, daily, 1

I have a German UI, so maybe my translation for the tabs doesn't fit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.