Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 21228  / 2 Years ago, fri, september 30, 2022, 6:41:03

I know that this was asked several times, but I don't know what to do... I've tried all the solutions proposed on AskUbuntu, but with no results...



So...
I have this shell script in my home /home/napolux:



#!/bin/bash
NOW=$(date +"%Y%m%d-%T")
cutycapt --url=http://example.com --out=/home/napolux/screens/yc.$NOW.png


The crontab is this:



* * * * * /home/napolux/yc-screens > /dev/null


cutycapt is a small command line tool that takes screenshots of webpages. The script (and the destination folder /home/napolux/script) as 777 permissions with execution flag.



The script is correct: by calling it via shell I can get the screenshot.



In /var/log/syslog I see the job running every minute.



May 18 20:13:01 ubu CRON[2649]: (CRON) info (No MTA installed, discarding output)
May 18 20:14:01 ubu CRON[2657]: (napolux) CMD (/home/napolux/yc-screens > /dev/null)
May 18 20:14:01 ubu CRON[2656]: (CRON) info (No MTA installed, discarding output)
May 18 20:15:01 ubu CRON[2662]: (napolux) CMD (/home/napolux/yc-screens > /dev/null)
May 18 20:15:01 ubu CRON[2661]: (CRON) info (No MTA installed, discarding output)


So, what can I do???


More From » cron

 Answers
2

Found the problem... cutycapt needs some sort of X server to work properly, so I used xvfb as explained here...



http://jamesmcdonald.id.au/it-tips/taking-screenshots-of-a-website-in-linux


[#38294] Friday, September 30, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
itagde

Total Points: 241
Total Questions: 113
Total Answers: 118

Location: Liechtenstein
Member since Wed, Dec 8, 2021
2 Years ago
itagde questions
Thu, Jun 10, 21, 21:24, 3 Years ago
Sat, Aug 13, 22, 22:41, 2 Years ago
Thu, May 20, 21, 11:52, 3 Years ago
Tue, Aug 23, 22, 06:19, 2 Years ago
;