Comments (3)
I don't know, if the script works when run manually it should also work when run as a cron job. Check if the server receives the message. If you don't control it use another one.
Also check the crontab PATH
. It is possible that wscat
is not found.
from wscat.
Thanks for your answer.
I'm sure that server receives nothing and even not a connection attempt.
I echoed the path variable in the script.
Called from my own session, path is
/usr/local/sbin:/usr/local/bin/:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/snap/bin
Called from crontab:
/usr/local/sbin:/usr/local/bin/:/usr/sbin:/usr/bin:/sbin:/bin
I don't see any significative difference.
I also added "which wscat" command that returns in both case the correct path...
from wscat.
I can confirm this behaviour.
Run from bash
/usr/local/bin/wscat -x . -c wss://example.com > /tmp/output.txt
writes the output to output.txt as expected while run from cron
*/1 * * * * /usr/local/bin/wscat -x . -c wss://example.com > /tmp/output.txt
only creates an empty file
from wscat.
Related Issues (20)
- Error reporting: SyntaxError: Unexpected token HOT 3
- error: WebSocket was closed before the connection was established HOT 2
- error: Server sent a subprotocol but none was requested HOT 1
- History persistance
- Request to support SignalR implementation.
- Backgrounding wscat HOT 1
- No error messages when console output is redirected
- Can I use this repo to detect websocket request header sec-websocket-key? HOT 1
- How to send null in wscat
- error: Unexpected server response: 200 HOT 1
- Send Initial message into interactive shell.
- Not seeing response data HOT 2
- wscat error: getaddrinfo ENOTFOUND --no-color --no-color:80 HOT 1
- error: connect ECONNREFUSED ::1:9001 HOT 1
- Support for binary response / hex output: HOT 1
- wscat breaks when IP of server changes HOT 3
- Is there a way to send two separate messages? HOT 2
- # in address HOT 1
- Cant connect to unix socket via `ws+unix:/...`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wscat.