Is there a software that runs a command at a time that i decide of the day?
Is there a software that runs a command at a time that i decide of the day or of the year?
About this post
- Posted
- Archived
- Score
- 134 · 93% up
- Kind
- Text
- ID
- juianf
Is there a software that runs a command at a time that i decide of the day or of the year?
76 comments
Deleted before we saved it.
Thank you, i will try cronjob
As much as people seem to hate systemd, I actually find timers more convenient than cronjobs. Assuming you're using systemd (who isn't these days?) you should check it out.
I wrote this some time ago to make creating systemd timers easier:
https://github.com/amlamarra/timertab
https://aur.archlinux.org/packages/timertab/
Have a look here for examples: https://crontab.guru/examples.html
I find that page pretty useful sometimes :)
Seriously, use systemd timers. Go with your time. You'll rapidly experience their superiority and easy setup compared to cronjob, plus you'll learn how to make systemd unit files in general.
Be aware that cron is only accurate to ~15min.sorry for any confusion, seems I misremembered something.Systemd timer. It's already in the system and pretty flexible. There's also an arch wiki article about that...
No need to install cron in my opinion.
Best thing I can think of is a cron job.
Deleted before we saved it.
Bro chill
Old method: cron or at
New method: systemd.timer or systemd-run
Wait Cron is considered old-fashioned?
There's a systemd alternative for everything nowadays, and in my opinion, it is almost always more functional.
Old method doesn't mean old fashioned.
I still use cron - I didn’t even know about systemd timers. Cool!
Cron
Cron :)
https://opensource.com/article/17/11/how-use-cron-linux
Crontab
systemd timers is the way to go.
Just use cron, it's used all over the place (CircleCi, AWS just off the top of my head) and just works. It's not that difficult to set the frequency exactly how you want it.
Just cronjob. You can also go to cronguru for schedule expressions.
at or chron
Why is this post having more than 100 upvotes and all the other requests I made barely had 3?
because it tickles the holy war of oldies from pre-systemd era and systemd hippies.
I did something like that to join online classes automatically. You can find the post in my account and change it to run a .sh file or whatever you want.
EDIT: Oh and I was using brave browser on linux (ubuntu) so it may vary between different os and browsers
https://www.reddit.com/r/Python/comments/h89g53/python_zoom_automation_from_terminal/?utm_source=share&utm_medium=ios_app&utm_name=iossmf
I also wrote a shell script version but its not finished (my school started changing ids and actually opening the website is easier than writing a code to get the ida from website).
Deleted before we saved it.
If you are writing your code in Python and want something super simple:
See here.
Until now I didn't even know about systemd timers, and I've set up plenty of my own systemd unit files.
Deleted before we saved it.
For all these folks complaining they need to man cron each time, heres a handy template of crontab file ..
#0 */2 * * * /home/archie/.bin/firefox-sync
#23 */6 * * * /home/archie/.bin/recupd.sh
#@reboot echo '~/.bin/firefox-sync' | tee -a ~/.bash_logout ~/.bash_profile >/dev/null
# | | | | | user command
# | | | | weekday (0-6) (Sunday=0)
# | | | month (1-12)
# | | day (0-31)
# | hour (0-23)
# minute (0-59)
I realized that I am late to the party but I think people should take a second and look at jobber - it's available on Arch and it is written in Go.
It has a really nice list of the jobs you have scheduled, a robust reporting system if a job fails to run, and you can use commands to force a test of your job easily and import and export lists of jobs.
It comes with a status page showing you when all the jobs are going to run based on how you have configured them and letting users who aren't super users configure jobs in their profile that are unique to them without invoking sudo.
Why bother with that when we have systemd timers ? Honest question. I read your full comment, and I see nothing not already available through timers.
Do systemd timers have any benefits over cron?
https://beepb00p.xyz/scheduler.html
Few extra features, more user friendly.
Be creative,write it