4

My selenium script cronjob is not running on the VPS.

I am not sure what's wrong with it

Even the crond service status just shows
the session was opened for the user root
shows the command
the session closed for user root

I tried the tons of solution available but nothing worked

I am using Ubuntu 16.04 with LXDE

Comments
  • 3
    Have you tried turning if off and on again?

    ...
    Seriously, my problems with desktop Ubuntu get fixed that way. Maybe will help with yours.
  • 1
    Pretty much every problem I had so far with running something as cronjob was missing environment variables. Always use full path names, never assume that a PATH or other environment variable is set correctly.
  • 0
    @haze well I have tried that dozens of time but that didn't help me
  • 0
    @TobiSGD path is correct I verified that
  • 1
    Does your script have the executable (+x) flag?
    Did your crontab get updated after you edited it? (Iirc of you just edit it with a text editor it doesn't update, you have to use the crontab command or do something else to reload the updated crontab)
  • 0
    @endor yes it is executable

    I use crontab to edit my cron jobs
  • 0
    for more info
  • 1
    @Ganofins Assuming that you don't have a MTA configured, have you tried to redirect the output of the command into a file to check if you get error-messages?
  • 0
    @TobiSGD yeah I tried that but there was not any output in the file
  • 0
    Do you have a display in the environment?
    If no, you could use xvfb
  • 0
    @StopMotionCuber I already specified that...I am using LXDE
  • 1
    @Ganofins You need your $DISPLAY environment variable set to an existing display to use that.
    It's easier and cleaner to use xvfb for that.
    Have a look here:
    http://elementalselenium.com/tips/...
  • 0
    I had to use schedule module to make it work
Add Comment