Call your script periodically on a server (with logging/debugging) | Web Scripts | Crax

Welcome To Crax.Pro Forum!

Check our new Marketplace at Crax.Shop

   Login! SignUp Now!
  • We are in solidarity with our brothers and sisters in Palestine. Free Palestine. To learn more visit this Page

  • Crax.Pro domain has been taken down!

    Alternatives: Craxpro.io | Craxpro.com

Call your script periodically on a server (with logging/debugging)

Call your script periodically on a server (with logging/debugging)

LV
1
 

chaoscra

Member
Joined
Aug 31, 2023
Threads
10
Likes
7
Awards
4
Credits
664©
Cash
0$
Bash:
# create a file to write debug/logging messages
mkdir /var/log/cron-jobs/
touch /var/log/cron-jobs/myScript.log

# call script via cronjob
crontab -e

# add the following to call your script every minute
* * * * * python /var/www/myScript.py >> /var/log/cron-jobs/myScript.log 2>&1
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

Top Bottom